Package rma.util

Class DefaultMemoryInfoSource

java.lang.Object
rma.util.DefaultMemoryInfoSource
All Implemented Interfaces:
MemoryInfoSource

public class DefaultMemoryInfoSource extends Object implements MemoryInfoSource
  • Constructor Details

    • DefaultMemoryInfoSource

      public DefaultMemoryInfoSource()
  • Method Details

    • canGC

      public boolean canGC()
      Specified by:
      canGC in interface MemoryInfoSource
      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 interface MemoryInfoSource
    • getFreeMemory

      public long getFreeMemory()
      Specified by:
      getFreeMemory in interface MemoryInfoSource
      Returns:
      The amount of free memory
    • getTotalMemory

      public long getTotalMemory()
      Specified by:
      getTotalMemory in interface MemoryInfoSource
      Returns:
      The total amount of memory
    • getDefaultPollingRateMilliseconds

      public long getDefaultPollingRateMilliseconds()
      Specified by:
      getDefaultPollingRateMilliseconds in interface MemoryInfoSource
      Returns:
      The recommended polling rate for this MemoryInfoSource, measured in milliseconds