Package com.atlassian.confluence.util
Interface JvmSystemResources
-
public interface JvmSystemResources
An 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 int
getAvailableProcessors()
org.springframework.util.unit.DataSize
getFreeMemory()
static JvmSystemResources
getRuntime()
-
-
-
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
JvmSystemResources
backed byRuntime
.
-
-