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:
canGCin interfaceMemoryInfoSource- Returns:
- True if the MemoryInfoSource supports attempting to garbage collect
-
doGC
public void doGC()Description copied from interface:MemoryInfoSourcePerform garbage collection. No-op if canGC() returns false- Specified by:
doGCin interfaceMemoryInfoSource
-
getFreeMemory
public long getFreeMemory()- Specified by:
getFreeMemoryin interfaceMemoryInfoSource- Returns:
- The amount of free memory
-
getTotalMemory
public long getTotalMemory()- Specified by:
getTotalMemoryin interfaceMemoryInfoSource- Returns:
- The total amount of memory
-
getDefaultPollingRateMilliseconds
public long getDefaultPollingRateMilliseconds()- Specified by:
getDefaultPollingRateMillisecondsin interfaceMemoryInfoSource- Returns:
- The recommended polling rate for this MemoryInfoSource, measured in milliseconds
-