public class

MemoryInfo

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.status.service.systeminfo.MemoryInfo

Class Overview

Simple bean encapsulating information about the system's memory usage. The usage information is calculated when the bean is instantiated (and not recalculated after)

Summary

Nested Classes
class MemoryInfo.Bytes Represents some number of bytes. 
Public Constructors
MemoryInfo()
Construct a new MemoryInfo containing details of Confluence's memory usage at time of instantiation.
Public Methods
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 getAvailablePermGen()
Gets the currently available permanent generation memory.
MemoryInfo.Bytes getFreeAllocatedHeap()
Gets the amount of currently allocated heap that has not been used.
@Deprecated long getFreeMemory()
This method is deprecated. since 3.1 produces misleading memory info. Please use newer API
@Deprecated long getFreeMemoryInMegabytes()
This method is deprecated. since 3.1 produces misleading memory info. Please use newer API
MemoryInfo.Bytes getMaxHeap()
Gets the maximum amount of heap the JVM is will allow to be allocated.
MemoryInfo.Bytes getMaxPermGen()
Gets the maximum permanent generation memory allocation.
@Deprecated long getTotalMemory()
This method is deprecated. since 3.1 produces misleading memory statistics. Please use newer API
@Deprecated long getTotalMemoryInMegabytes()
This method is deprecated. since 3.1 produces misleading memory info. Please use newer API
MemoryInfo.Bytes getUsedHeap()
Gets the amount of heap currently used by the JVM.
@Deprecated long getUsedMemory()
This method is deprecated. since 3.1. Use getUsedHeap()
@Deprecated long getUsedMemoryInMegabytes()
This method is deprecated. since 3.1. Use getUsedHeap()
MemoryInfo.Bytes getUsedPermGen()
Gets the currently used permanent generation memory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MemoryInfo ()

Construct a new MemoryInfo containing details of Confluence's memory usage at time of instantiation.

Public Methods

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.

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

public MemoryInfo.Bytes getAvailablePermGen ()

Gets the currently available permanent generation memory.

Returns
  • the available permanent generation memory.

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

@Deprecated public long getFreeMemory ()

This method is deprecated.
since 3.1 produces misleading memory info. Please use newer API

@Deprecated public long getFreeMemoryInMegabytes ()

This method is deprecated.
since 3.1 produces misleading memory info. Please use newer API

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.

public MemoryInfo.Bytes getMaxPermGen ()

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

@Deprecated public long getTotalMemory ()

This method is deprecated.
since 3.1 produces misleading memory statistics. Please use newer API

@Deprecated public long getTotalMemoryInMegabytes ()

This method is deprecated.
since 3.1 produces misleading memory info. Please use newer API

public MemoryInfo.Bytes getUsedHeap ()

Gets the amount of heap currently used by the JVM.

Returns
  • the amount of heap currently used by the JVM

@Deprecated public long getUsedMemory ()

This method is deprecated.
since 3.1. Use getUsedHeap()

@Deprecated public long getUsedMemoryInMegabytes ()

This method is deprecated.
since 3.1. Use getUsedHeap()

public MemoryInfo.Bytes getUsedPermGen ()

Gets the currently used permanent generation memory.

Returns
  • the currently used permanent generation memory.