Class HeapStatusProvider

java.lang.Object
com.github.jpmsilva.jsystemd.HeapStatusProvider
All Implemented Interfaces:
StatusProvider

public class HeapStatusProvider extends Object implements StatusProvider
Implementation of StatusProvider that provides the memory used by the heap, out of its committed size, such as Heap: 139.5 MiB/256.0 MiB.

The committed size is the memory the JVM currently holds for the heap, which it grows and shrinks as needed, up to the maximum size of the heap (-Xmx): it is not a limit, so a heap whose used memory is close to it is not about to run out of memory. The used memory also swings with every allocation and collection; the OldGenerationStatusProvider tells how close the heap is to its maximum size, from what survives the collections.

Author:
Joao Silva
  • Constructor Details

    • HeapStatusProvider

      public HeapStatusProvider()
      Create a new HeapStatusProvider.
  • Method Details

    • status

      public String status()
      Description copied from interface: StatusProvider
      Exposes status information to send to systemd.
      Specified by:
      status in interface StatusProvider
      Returns:
      the string message to add to the service status