public class CmsMemoryStatus
extends java.lang.Object
构造器和说明 |
---|
CmsMemoryStatus()
Initializes a new instance of the memory status with the current memory values.
|
限定符和类型 | 方法和说明 |
---|---|
void |
calculateAverage(CmsMemoryStatus currentStatus)
Calculates the average memory consumption by updating the stored information with
the provided current information.
|
int |
getCount()
Returns the count used to calculate the average.
|
long |
getFreeMemory()
Returns the current free memory, in megabytes.
|
long |
getMaxMemory()
Returns the maximum available memory, in megabytes.
|
long |
getTotalMemory()
Returns the amount of memory currently availble to the JVM, in megabytes.
|
long |
getUsage()
Returns the current memory usage, in percent.
|
long |
getUsedMemory()
Returns the amount of memory currently used, in megabytes.
|
void |
update()
Updates this memory status with the current memory information.
|
public CmsMemoryStatus()
public void calculateAverage(CmsMemoryStatus currentStatus)
currentStatus
- the memory status to update the average withpublic int getCount()
public long getFreeMemory()
public long getMaxMemory()
public long getTotalMemory()
public long getUsage()
public long getUsedMemory()
public void update()