Package rma.util
Class DefaultMemoryInfoSource
java.lang.Object
rma.util.DefaultMemoryInfoSource
- All Implemented Interfaces:
MemoryInfoSource
-
Constructor Details
-
DefaultMemoryInfoSource
public DefaultMemoryInfoSource()
-
-
Method Details
-
canGC
public boolean canGC()- Specified by:
canGC
in interfaceMemoryInfoSource
- Returns:
- True if the MemoryInfoSource supports attempting to garbage collect
-
doGC
public void doGC()Description copied from interface:MemoryInfoSource
Perform garbage collection. No-op if canGC() returns false- Specified by:
doGC
in interfaceMemoryInfoSource
-
getFreeMemory
public long getFreeMemory()- Specified by:
getFreeMemory
in interfaceMemoryInfoSource
- Returns:
- The amount of free memory
-
getTotalMemory
public long getTotalMemory()- Specified by:
getTotalMemory
in interfaceMemoryInfoSource
- Returns:
- The total amount of memory
-
getDefaultPollingRateMilliseconds
public long getDefaultPollingRateMilliseconds()- Specified by:
getDefaultPollingRateMilliseconds
in interfaceMemoryInfoSource
- Returns:
- The recommended polling rate for this MemoryInfoSource, measured in milliseconds
-