Package com.cedarsoftware.util
Class SystemUtilities.MemoryInfo
java.lang.Object
com.cedarsoftware.util.SystemUtilities.MemoryInfo
- Enclosing class:
- SystemUtilities
Simple container class describing the JVM memory usage at a given point
in time.
-
Constructor Summary
ConstructorsConstructorDescriptionMemoryInfo
(long totalMemory, long freeMemory, long maxMemory) Create an instance holding the supplied memory metrics. -
Method Summary
-
Constructor Details
-
MemoryInfo
public MemoryInfo(long totalMemory, long freeMemory, long maxMemory) Create an instance holding the supplied memory metrics.- Parameters:
totalMemory
- total memory currently allocated to the JVMfreeMemory
- amount of memory that is unusedmaxMemory
- maximum memory the JVM will attempt to use
-
-
Method Details
-
getTotalMemory
public long getTotalMemory()- Returns:
- the total memory currently allocated to the JVM
-
getFreeMemory
public long getFreeMemory()- Returns:
- the amount of unused memory
-
getMaxMemory
public long getMaxMemory()- Returns:
- the maximum memory the JVM can utilize
-