Package org.jppf.management.diagnostics
Class MemoryUsageInformation
java.lang.Object
org.jppf.management.diagnostics.MemoryUsageInformation
- All Implemented Interfaces:
Serializable
A
Serializable implementation of MemoryUsage.- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMemoryUsageInformation(MemoryUsage memUsage) Initialize this object from aMemoryUsageinstance. -
Method Summary
-
Constructor Details
-
MemoryUsageInformation
Initialize this object from aMemoryUsageinstance.- Parameters:
memUsage- contains the memroy usage information to use.
-
-
Method Details
-
getInit
public long getInit()Get the initial memory size.- Returns:
- the initial memory size.
-
getCommitted
public long getCommitted()Get the current memory size.- Returns:
- the current memory size.
-
getUsed
public long getUsed()Get the used memory size.- Returns:
- the used memory size.
-
getMax
public long getMax()Get the maximum memory size.- Returns:
- the maximum memory size.
-
getUsedRatio
public double getUsedRatio()Return the ratio of used memory over maximum available memory.- Returns:
- the ratio as a double value in the range [0, 1], or -1 if the maximum memory information is not available.
-
toString
-