Package rma.util

Interface MemoryInfoSource

All Known Implementing Classes:
DefaultMemoryInfoSource

public interface MemoryInfoSource
Provides memory usage information, optionally allows performing garbage collection where the memory info was collected
  • Method Details

    • canGC

      boolean canGC()
      Returns:
      True if the MemoryInfoSource supports attempting to garbage collect
    • doGC

      void doGC()
      Perform garbage collection. No-op if canGC() returns false
    • getFreeMemory

      long getFreeMemory()
      Returns:
      The amount of free memory
    • getTotalMemory

      long getTotalMemory()
      Returns:
      The total amount of memory
    • getDefaultPollingRateMilliseconds

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