Package com.atlassian.confluence.util
Interface JvmSystemResources
-
public interface JvmSystemResourcesAn abstraction around the system resources-lated methods inRuntime, to allow easier testing.- Since:
- 7.14
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAvailableProcessors()org.springframework.util.unit.DataSizegetFreeMemory()static JvmSystemResourcesgetRuntime()
-
-
-
Method Detail
-
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
JvmSystemResourcesbacked byRuntime.
-
-