Class MemoryInfo
- java.lang.Object
-
- com.atlassian.confluence.status.service.systeminfo.MemoryInfo
-
public class MemoryInfo extends Object
Simple bean encapsulating information about the system's memory usage. The usage information is calculated when the bean is instantiated (and not recalculated after)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MemoryInfo.Bytes
Represents some number of bytes.
-
Constructor Summary
Constructors Constructor Description MemoryInfo()
Construct a new MemoryInfo containing details of Confluence's memory usage at time of instantiation.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MemoryInfo.Bytes
getAllocatedHeap()
Gets the amount of heap currently allocated by the JVM.MemoryInfo.Bytes
getAvailableHeap()
Gets the total heap still available to be used.MemoryInfo.Bytes
getAvailableNonHeap()
MemoryInfo.Bytes
getAvailablePermGen()
Deprecated.since 5.10 because PermGen no longer exists in Java8MemoryInfo.Bytes
getFreeAllocatedHeap()
Gets the amount of currently allocated heap that has not been used.MemoryInfo.Bytes
getMaxHeap()
Gets the maximum amount of heap the JVM is will allow to be allocated.MemoryInfo.Bytes
getMaxNonHeap()
MemoryInfo.Bytes
getMaxPermGen()
Deprecated.since 5.10 because PermGen no longer exists in Java8MemoryInfo.Bytes
getUsedHeap()
Gets the amount of heap currently used by the JVM.MemoryInfo.Bytes
getUsedNonHeap()
MemoryInfo.Bytes
getUsedPermGen()
Deprecated.since 5.10 because PermGen no longer exists in Java8MemoryInfo.Bytes
getXms()
MemoryInfo.Bytes
getXmx()
-
-
-
Method Detail
-
getAvailableHeap
public MemoryInfo.Bytes getAvailableHeap()
Gets the total heap still available to be used. This includes heap that the JVM is configured to use but has not yet allocated. To most users this will be the "free" memory.- Returns:
- get the total heap still available to be used
-
getFreeAllocatedHeap
public MemoryInfo.Bytes getFreeAllocatedHeap()
Gets the amount of currently allocated heap that has not been used. This is the value that Confluence used to report as "free memory".- Returns:
- the amount of allocated heap that is not used
-
getMaxHeap
public MemoryInfo.Bytes getMaxHeap()
Gets the maximum amount of heap the JVM is will allow to be allocated. This should be close to (but probably not exactly the same as) the JVM's -Xmx setting.- Returns:
- the maximum heap for the JVM, or -1 if there is no limit.
-
getAllocatedHeap
public MemoryInfo.Bytes getAllocatedHeap()
Gets the amount of heap currently allocated by the JVM. This is the value that Confluence used to report as "total memory".- Returns:
- the amount of heap currently allocated by the JVM.
-
getUsedHeap
public MemoryInfo.Bytes getUsedHeap()
Gets the amount of heap currently used by the JVM.- Returns:
- the amount of heap currently used by the JVM
-
getMaxPermGen
@Deprecated public MemoryInfo.Bytes getMaxPermGen()
Deprecated.since 5.10 because PermGen no longer exists in Java8Gets the maximum permanent generation memory allocation. This should be close to (or even the same as) the -XXMaxPermSize setting- Returns:
- the maximum permanent generation size
-
getUsedPermGen
@Deprecated public MemoryInfo.Bytes getUsedPermGen()
Deprecated.since 5.10 because PermGen no longer exists in Java8Gets the currently used permanent generation memory.- Returns:
- the currently used permanent generation memory.
-
getAvailablePermGen
@Deprecated public MemoryInfo.Bytes getAvailablePermGen()
Deprecated.since 5.10 because PermGen no longer exists in Java8Gets the currently available permanent generation memory.- Returns:
- the available permanent generation memory.
-
getMaxNonHeap
public MemoryInfo.Bytes getMaxNonHeap()
- Returns:
- the maximum non-heap memory
- Since:
- 7.1
-
getUsedNonHeap
public MemoryInfo.Bytes getUsedNonHeap()
- Returns:
- the used non-heap memory
- Since:
- 7.1
-
getAvailableNonHeap
public MemoryInfo.Bytes getAvailableNonHeap()
- Returns:
- the available non-heap. -1 if there is no limit.
- Since:
- 7.1
-
getXmx
public MemoryInfo.Bytes getXmx()
- Returns:
- the maximum heap memory allocation
- Since:
- 7.1
-
getXms
public MemoryInfo.Bytes getXms()
- Returns:
- the minimum heap memory allocation size
- Since:
- 7.1
-
-