Class 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)
    • Constructor Detail

      • MemoryInfo

        public MemoryInfo()
        Construct a new MemoryInfo containing details of Confluence's memory usage at time of instantiation.
    • 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 Java8
        Gets 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 Java8
        Gets 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 Java8
        Gets 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