Class MemoryUsageMonitorEntry
- java.lang.Object
-
- com.unboundid.ldap.sdk.unboundidds.monitors.MonitorEntry
-
- com.unboundid.ldap.sdk.unboundidds.monitors.MemoryUsageMonitorEntry
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class MemoryUsageMonitorEntry extends MonitorEntry
This class defines a monitor entry that provides information about the memory usage for the JVM in which the Directory Server is running. In particular, it reports information about the memory pools and garbage collectors defined in the JVM.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
The information that may be available in the memory usage monitor entry includes:- The names of the memory pools that are in use within the JVM.
- The number of bytes currently used within each memory pool.
- The number of bytes used within each memory pool after the last garbage collection.
- The names of the garbage collectors that are in use within the JVM.
- The number of garbage collections performed by each collector.
- The total duration of all garbage collections performed by each collector.
- The average duration of garbage collections performed by each collector.
- The duration of the most recent garbage collection performed by each collector.
- The amount of non-heap memory consumed by the JVM.
- The number of detected pauses of various durations detected by the server.
- The duration of the longest pause detected by the server.
MonitorManager.getMemoryUsageMonitorEntry(com.unboundid.ldap.sdk.LDAPConnection)
method. This entry provides specific methods for accessing information about JVM memory usage (e.g., thegetMemoryPoolNames()
method can be used to retrieve the names of the memory pool). Alternately, this information may be accessed using the generic API. See theMonitorManager
class documentation for an example that demonstrates the use of the generic API for accessing monitor data.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MemoryUsageMonitorEntry(Entry entry)
Creates a new memory usage monitor entry from the provided entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Long
getAverageCollectionDuration(java.lang.String collectorName)
Retrieves the average garbage collection duration (in milliseconds) for the specified collector.java.util.Map<java.lang.String,java.lang.Long>
getAverageCollectionDurations()
Retrieves a map containing the average garbage collection duration (in milliseconds) per garbage collector.java.util.Map<java.lang.String,java.lang.Long>
getBytesUsedAfterLastCollection()
Retrieves a map containing the number of bytes used after the last garbage collection per memory pool.java.lang.Long
getBytesUsedAfterLastCollection(java.lang.String poolName)
Retrieves the number of bytes used after the last garbage collection for the specified memory pool.java.util.Map<java.lang.String,java.lang.Long>
getCurrentBytesUsed()
Retrieves a map containing the current number of bytes used per memory pool.java.lang.Long
getCurrentBytesUsed(java.lang.String poolName)
Retrieves the current number of bytes used for the specified memory pool.java.lang.Long
getCurrentReservedMemoryMB()
Retrieves the amount of memory (in megabytes) that is currently allocated for use by the JVM.java.util.Map<java.lang.Long,java.lang.Long>
getDetectedPauseCounts()
Retrieves the number of pauses of various durations detected by the server.java.lang.Long
getFreeReservedMemoryMB()
Retrieves the amount of memory (in megabytes) allocated for use by the JVM that is not currently in use for holding Java objects.java.util.List<java.lang.String>
getGarbageCollectorNames()
Retrieves the names of the garbage collectors for which information is available.java.lang.Long
getMaxDetectedPauseTimeMillis()
Retrieves the duration of the longest pause detected by the server.java.lang.Long
getMaxReservableMemoryMB()
Retrieves the maximum amount of memory (in megabytes) that may be allocated and used by the JVM.java.util.List<java.lang.String>
getMemoryPoolNames()
Retrieves the names of the memory pools for which information is available.java.util.Map<java.lang.String,MonitorAttribute>
getMonitorAttributes()
Retrieves the set of parsed monitor attributes for this monitor entry, mapped from a unique identifier (in all lowercase characters) to the corresponding monitor attribute.java.lang.String
getMonitorDescription()
Retrieves a human-readable description name for this monitor entry.java.lang.String
getMonitorDisplayName()
Retrieves a human-readable display name for this monitor entry.java.lang.Long
getNonHeapMemoryBytesUsed()
Retrieves the amount of non-heap memory consumed by the JVM.java.lang.Long
getPercentageOfCommittedTenuredMemoryUsedByMemoryConsumers()
Retrieves the percentage of the committed amount of tenured memory that is used by memory consumers (assuming that all memory used by memory consumers is contained in the tenured generation).java.lang.Long
getPercentageOfMaximumTenuredMemoryUsedByMemoryConsumers()
Retrieves the percentage of the maximum allowed amount of tenured memory that is used by memory consumers (assuming that all memory used by memory consumers is contained in the tenured generation).java.lang.Long
getRecentCollectionDuration(java.lang.String collectorName)
Retrieves the duration (in milliseconds) of the most recent garbage collection for the specified collector.java.util.Map<java.lang.String,java.lang.Long>
getRecentCollectionDurations()
Retrieves a map containing the most recent garbage collection duration (in milliseconds) per garbage collector.java.lang.Long
getReservedMemoryPercentFull()
Retrieves the percent of the currently-reserved memory that is actually in use by the JVM for storing Java objects.java.lang.Long
getTotalBytesUsedByMemoryConsumers()
Retrieves the total amount of memory in bytes held by memory consumers.java.lang.Long
getTotalCollectionCount(java.lang.String collectorName)
Retrieves the total number of garbage collections performed by the specified collector.java.util.Map<java.lang.String,java.lang.Long>
getTotalCollectionCounts()
Retrieves a map containing the total number of garbage collections performed per collector.java.lang.Long
getTotalCollectionDuration(java.lang.String collectorName)
Retrieves the total length of time (in milliseconds) spent performing garbage collection for the specified collector.java.util.Map<java.lang.String,java.lang.Long>
getTotalCollectionDurations()
Retrieves a map containing the total length of time (in milliseconds) spent performing garbage collection per collector.java.lang.Long
getUsedReservedMemoryMB()
Retrieves the amount of memory (in megabytes) allocated for use by the JVM that is currently in use for holding Java objects.-
Methods inherited from class com.unboundid.ldap.sdk.unboundidds.monitors.MonitorEntry
addMonitorAttribute, addMonitorAttribute, addMonitorAttribute, addMonitorAttribute, addMonitorAttribute, addMonitorAttribute, addMonitorAttribute, decode, getBoolean, getDate, getDN, getDouble, getEntry, getInteger, getLong, getMonitorClass, getMonitorName, getString, getStrings, toString, toString
-
-
-
-
Constructor Detail
-
MemoryUsageMonitorEntry
public MemoryUsageMonitorEntry(Entry entry)
Creates a new memory usage monitor entry from the provided entry.- Parameters:
entry
- The entry to be parsed as a memory usage monitor entry. It must not benull
.
-
-
Method Detail
-
getMaxReservableMemoryMB
public java.lang.Long getMaxReservableMemoryMB()
Retrieves the maximum amount of memory (in megabytes) that may be allocated and used by the JVM.- Returns:
- The maximum amount of memory (in megabytes) that may be allocated
and used by the JVM, or
null
if this was not included in the monitor entry.
-
getCurrentReservedMemoryMB
public java.lang.Long getCurrentReservedMemoryMB()
Retrieves the amount of memory (in megabytes) that is currently allocated for use by the JVM.- Returns:
- The amount of memory (in megabytes) that is currently allocated
for use by the JVM, or
null
if this was not included in the monitor entry.
-
getUsedReservedMemoryMB
public java.lang.Long getUsedReservedMemoryMB()
Retrieves the amount of memory (in megabytes) allocated for use by the JVM that is currently in use for holding Java objects.- Returns:
- The amount of memory (in megabytes) allocated for use by the JVM
that is currently in use for holding Java objects, or
null
if this was not included in the monitor entry.
-
getFreeReservedMemoryMB
public java.lang.Long getFreeReservedMemoryMB()
Retrieves the amount of memory (in megabytes) allocated for use by the JVM that is not currently in use for holding Java objects.- Returns:
- The amount of memory (in megabytes) allocated for use by the JVM
that is not currently in use for holding Java objects, or
null
if this was not included in the monitor entry.
-
getReservedMemoryPercentFull
public java.lang.Long getReservedMemoryPercentFull()
Retrieves the percent of the currently-reserved memory that is actually in use by the JVM for storing Java objects.- Returns:
- The percent of the currently-reserved memory that is actually in use by the JVM for storing Java objects.
-
getGarbageCollectorNames
public java.util.List<java.lang.String> getGarbageCollectorNames()
Retrieves the names of the garbage collectors for which information is available.- Returns:
- The names of the garbage collectors for which information is available.
-
getMemoryPoolNames
public java.util.List<java.lang.String> getMemoryPoolNames()
Retrieves the names of the memory pools for which information is available.- Returns:
- The names of the memory pools for which information is available.
-
getTotalCollectionCounts
public java.util.Map<java.lang.String,java.lang.Long> getTotalCollectionCounts()
Retrieves a map containing the total number of garbage collections performed per collector.- Returns:
- A map containing the total number of garbage collections performed per collector.
-
getTotalCollectionCount
public java.lang.Long getTotalCollectionCount(java.lang.String collectorName)
Retrieves the total number of garbage collections performed by the specified collector.- Parameters:
collectorName
- The name of the garbage collector for which to retrieve the information.- Returns:
- The total number of garbage collections performed by the specified
collector, or
null
if that information is not available.
-
getTotalCollectionDurations
public java.util.Map<java.lang.String,java.lang.Long> getTotalCollectionDurations()
Retrieves a map containing the total length of time (in milliseconds) spent performing garbage collection per collector.- Returns:
- A map containing the total length of time (in milliseconds) spent performing garbage collection per collector.
-
getTotalCollectionDuration
public java.lang.Long getTotalCollectionDuration(java.lang.String collectorName)
Retrieves the total length of time (in milliseconds) spent performing garbage collection for the specified collector.- Parameters:
collectorName
- The name of the garbage collector for which to retrieve the information.- Returns:
- The total length of time (in milliseconds) spent performing
garbage collection for the specified collector, or
null
if that information is not available.
-
getAverageCollectionDurations
public java.util.Map<java.lang.String,java.lang.Long> getAverageCollectionDurations()
Retrieves a map containing the average garbage collection duration (in milliseconds) per garbage collector.- Returns:
- A map containing the average garbage collection duration (in milliseconds) per garbage collector.
-
getAverageCollectionDuration
public java.lang.Long getAverageCollectionDuration(java.lang.String collectorName)
Retrieves the average garbage collection duration (in milliseconds) for the specified collector.- Parameters:
collectorName
- The name of the garbage collector for which to retrieve the information.- Returns:
- The average garbage collection duration (in milliseconds) for the
specified collector, or
null
if that information is not available.
-
getRecentCollectionDurations
public java.util.Map<java.lang.String,java.lang.Long> getRecentCollectionDurations()
Retrieves a map containing the most recent garbage collection duration (in milliseconds) per garbage collector.- Returns:
- A map containing the duration of the most recent garbage collection duration (in milliseconds) per garbage collector.
-
getRecentCollectionDuration
public java.lang.Long getRecentCollectionDuration(java.lang.String collectorName)
Retrieves the duration (in milliseconds) of the most recent garbage collection for the specified collector.- Parameters:
collectorName
- The name of the garbage collector for which to retrieve the information.- Returns:
- The duration (in milliseconds) of the most recent garbage
collection for the specified collector, or
null
if that information is not available.
-
getCurrentBytesUsed
public java.util.Map<java.lang.String,java.lang.Long> getCurrentBytesUsed()
Retrieves a map containing the current number of bytes used per memory pool.- Returns:
- A map containing the current number of bytes used per memory pool.
-
getCurrentBytesUsed
public java.lang.Long getCurrentBytesUsed(java.lang.String poolName)
Retrieves the current number of bytes used for the specified memory pool.- Parameters:
poolName
- The name of the memory pool for which to retrieve the information.- Returns:
- The current number of bytes used for the specified memory pool, or
null
if that information is not available.
-
getBytesUsedAfterLastCollection
public java.util.Map<java.lang.String,java.lang.Long> getBytesUsedAfterLastCollection()
Retrieves a map containing the number of bytes used after the last garbage collection per memory pool.- Returns:
- A map containing the number of bytes used after the last garbage collection per memory pool.
-
getBytesUsedAfterLastCollection
public java.lang.Long getBytesUsedAfterLastCollection(java.lang.String poolName)
Retrieves the number of bytes used after the last garbage collection for the specified memory pool.- Parameters:
poolName
- The name of the memory pool for which to retrieve the information.- Returns:
- The number of bytes used after the last garbage collection for the
specified memory pool, or
null
if that information is not available.
-
getNonHeapMemoryBytesUsed
public java.lang.Long getNonHeapMemoryBytesUsed()
Retrieves the amount of non-heap memory consumed by the JVM.- Returns:
- The amount of non-heap memory consumed by the JVM, or
null
if that information is not available.
-
getTotalBytesUsedByMemoryConsumers
public java.lang.Long getTotalBytesUsedByMemoryConsumers()
Retrieves the total amount of memory in bytes held by memory consumers.- Returns:
- The total amount of memory in bytes held by memory consumers, or
null
if that information is not available.
-
getPercentageOfMaximumTenuredMemoryUsedByMemoryConsumers
public java.lang.Long getPercentageOfMaximumTenuredMemoryUsedByMemoryConsumers()
Retrieves the percentage of the maximum allowed amount of tenured memory that is used by memory consumers (assuming that all memory used by memory consumers is contained in the tenured generation).- Returns:
- The percentage of the maximum allowed amount of tenured memory
that is used by memory consumers, or
null
if that information is not available.
-
getPercentageOfCommittedTenuredMemoryUsedByMemoryConsumers
public java.lang.Long getPercentageOfCommittedTenuredMemoryUsedByMemoryConsumers()
Retrieves the percentage of the committed amount of tenured memory that is used by memory consumers (assuming that all memory used by memory consumers is contained in the tenured generation).- Returns:
- The percentage of the committed amount of tenured memory that is
used by memory consumers, or
null
if that information is not available.
-
getDetectedPauseCounts
public java.util.Map<java.lang.Long,java.lang.Long> getDetectedPauseCounts()
Retrieves the number of pauses of various durations detected by the server. The value returned will contain a map between the minimum duration in milliseconds for the associated bucket and the number of pauses detected of at least that duration.- Returns:
- The number of pauses of various durations detected by the server.
-
getMaxDetectedPauseTimeMillis
public java.lang.Long getMaxDetectedPauseTimeMillis()
Retrieves the duration of the longest pause detected by the server.- Returns:
- The duration of the longest pause detected by the server, or
null
if that information is not available.
-
getMonitorDisplayName
public java.lang.String getMonitorDisplayName()
Retrieves a human-readable display name for this monitor entry.- Overrides:
getMonitorDisplayName
in classMonitorEntry
- Returns:
- A human-readable display name for this monitor entry.
-
getMonitorDescription
public java.lang.String getMonitorDescription()
Retrieves a human-readable description name for this monitor entry.- Overrides:
getMonitorDescription
in classMonitorEntry
- Returns:
- A human-readable description name for this monitor entry.
-
getMonitorAttributes
public java.util.Map<java.lang.String,MonitorAttribute> getMonitorAttributes()
Retrieves the set of parsed monitor attributes for this monitor entry, mapped from a unique identifier (in all lowercase characters) to the corresponding monitor attribute.- Overrides:
getMonitorAttributes
in classMonitorEntry
- Returns:
- The set of parsed monitor attributes for this monitor entry.
-
-