Package com.atlassian.confluence.util
Interface JvmSystemResources
public interface JvmSystemResources
An abstraction around the system resources-lated methods in
Runtime
, to allow easier testing.- Since:
- 7.14
-
Method Summary
Modifier and TypeMethodDescriptionint
org.springframework.util.unit.DataSize
static JvmSystemResources
-
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
- Returns:
- A
JvmSystemResources
backed byRuntime
.
-