Interface JvmSystemResources


public interface JvmSystemResources
An abstraction around the system resources-lated methods in Runtime, to allow easier testing.
Since:
7.14
  • Method Details

    • getAvailableProcessors

      int getAvailableProcessors()
      Returns:
      The number of available processors/CPUs/vCPUs/cores on the system.
    • getFreeMemory

      org.springframework.util.unit.DataSize getFreeMemory()
      Returns:
      The amount of free/available memory on the heap.
    • getRuntime

      static JvmSystemResources getRuntime()
      Returns:
      A JvmSystemResources backed by Runtime.