Interface ResourceMonitoringService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getFreeMemory()
      Returns the free memory.
      long getMaxMemory()
      Returns the max memory.
      long getTotalMemory()
      Returns the total memory.
      ej.basictool.map.PackedMap<java.lang.String,​java.lang.Float> getUsedCpuPercentPerModule()
      Retrieves the CPU usage for each module from the previous monitoring cycle, expressed as a percentage.
      ej.basictool.map.PackedMap<java.lang.String,​java.lang.Float> getUsedMemoryPercentPerModule()
      Retrieves the RAM usage values expressed as a percentage (a value between 0 and 1.0).
      ej.basictool.map.PackedMap<java.lang.String,​java.lang.Long> getUsedMemoryPerModule()
      Retrieves the current RAM usage for each module.
    • Method Detail

      • getUsedCpuPercentPerModule

        ej.basictool.map.PackedMap<java.lang.String,​java.lang.Float> getUsedCpuPercentPerModule()
        Retrieves the CPU usage for each module from the previous monitoring cycle, expressed as a percentage.
        Returns:
        a map where each entry contains a module name as the key and its CPU usage percentage (0.0 to 1.0) as the value.
      • getUsedMemoryPercentPerModule

        ej.basictool.map.PackedMap<java.lang.String,​java.lang.Float> getUsedMemoryPercentPerModule()
        Retrieves the RAM usage values expressed as a percentage (a value between 0 and 1.0).

        The percentage indicates the ratio between a module's current heap consumption and the total heap.

        Returns:
        a map where each entry contains the module name as the key and its current RAM usage percentage as the value.
      • getUsedMemoryPerModule

        ej.basictool.map.PackedMap<java.lang.String,​java.lang.Long> getUsedMemoryPerModule()
        Retrieves the current RAM usage for each module.
        Returns:
        a map where each entry contains a module identifier as the key and its current RAM usage in bytes as the value.
      • getFreeMemory

        long getFreeMemory()
        Returns the free memory.
        Returns:
        the free memory.
      • getMaxMemory

        long getMaxMemory()
        Returns the max memory.
        Returns:
        the max memory.
      • getTotalMemory

        long getTotalMemory()
        Returns the total memory.
        Returns:
        the total memory.