com.jezhumble.javasysmon
Class MemoryStats
java.lang.Object
com.jezhumble.javasysmon.MemoryStats
public class MemoryStats
- extends java.lang.Object
This object represents a snapshot detailing the total memory of
some type (physical or swap) available to the operating system,
and the amount that is currently free.
Method Summary |
long |
getFreeBytes()
The amount of memory that is currently free, in bytes. |
long |
getTotalBytes()
The amount of memory that is available to the operating system,
in bytes. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MemoryStats
public MemoryStats(long free,
long total)
getFreeBytes
public long getFreeBytes()
- The amount of memory that is currently free, in bytes.
- Returns:
- The amount of memory that is currently free.
getTotalBytes
public long getTotalBytes()
- The amount of memory that is available to the operating system,
in bytes.
- Returns:
- The total amount of memory that is available.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2009 ThoughtWorks. All Rights Reserved.