Class ExtendedMemoryMXBeanImpl
java.lang.Object
com.ibm.lang.management.internal.ExtendedMemoryMXBeanImpl
- All Implemented Interfaces:
 MemoryMXBean, MemoryMXBean, PlatformManagedObject, NotificationBroadcaster, NotificationEmitter
Runtime type for 
MemoryMXBean.- 
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) Adds a listener to this MBean.voidgc()Requests the virtual machine to run the system garbage collector.intReturns a list of all of the instances ofGarbageCollectorMXBeanin this virtual machine.longlongReturns the current memory usage of the heap for both live objects and for objects no longer in use which are awaiting garbage collection.static ExtendedMemoryMXBeanImpllonglongintgetMemoryManagerMXBeans(boolean copy) Retrieves the list of memory manager beans in the system.getMemoryPoolMXBeans(boolean copy) Retrieves the list of memory pool beans managed by this manager.longReturns the current non-heap memory usage for the virtual machine.Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.Returns anObjectNameinstance representing the object name of this platform managed object.intReturns the number of objects in the virtual machine that are awaiting finalization.longlonglonglonglonglonglonglonglonglongbooleanbooleanReturns a boolean indication of whether or not the memory system is producing verbose output.protected GarbageCollectorMXBeanmakeGCBean(String domainName, String name, int internalID) Create a new GarbageCollectorMXBean.protected MemoryPoolMXBeanmakeMemoryPoolBean(String name, MemoryType type, int internalID) Create a new MemoryPoolMXBean.final voidRemoves a listener from this MBean.final voidremoveNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) Removes a listener from this MBean.final voidsendNotification(Notification notification) Send notifications to registered listeners.voidsetMaxHeapSize(long size) booleansetSharedClassCacheMaxAotBytes(long value) booleansetSharedClassCacheMaxJitDataBytes(long value) booleansetSharedClassCacheMinAotBytes(long value) booleansetSharedClassCacheMinJitDataBytes(long value) booleansetSharedClassCacheSoftmxBytes(long value) voidsetVerbose(boolean value) Updates the verbose output setting of the memory system.protected voidEnsure the notification thread is running.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface MemoryMXBean
getCurrentGCThreads, getGCMainThreadCpuUsed, getGCMode, getGCWorkerThreadsCpuUsed, getMaxHeapSize, getMaxHeapSizeLimit, getMaximumGCThreads, getMinHeapSize, getSharedClassCacheFreeSpace, getSharedClassCacheMaxAotBytes, getSharedClassCacheMaxAotUnstoredBytes, getSharedClassCacheMaxJitDataBytes, getSharedClassCacheMaxJitDataUnstoredBytes, getSharedClassCacheMinAotBytes, getSharedClassCacheMinJitDataBytes, getSharedClassCacheSize, getSharedClassCacheSoftmxBytes, getSharedClassCacheSoftmxUnstoredBytes, isSetMaxHeapSizeSupported, setMaxHeapSize, setSharedClassCacheMaxAotBytes, setSharedClassCacheMaxJitDataBytes, setSharedClassCacheMinAotBytes, setSharedClassCacheMinJitDataBytes, setSharedClassCacheSoftmxBytesMethods declared in interface MemoryMXBean
gc, getHeapMemoryUsage, getNonHeapMemoryUsage, getObjectPendingFinalizationCount, isVerbose, setVerboseMethods declared in interface PlatformManagedObject
getObjectName 
- 
Method Details
- 
getInstance
 - 
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException Adds a listener to this MBean.- Specified by:
 addNotificationListenerin interfaceNotificationBroadcaster- Parameters:
 listener- The listener object which will handle the notifications emitted by the broadcaster.filter- The filter object. If filter is null, no filtering will be performed before handling notifications.handback- An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.- Throws:
 IllegalArgumentException- Listener parameter is null.- See Also:
 
 - 
startNotificationThread
protected void startNotificationThread()Ensure the notification thread is running. - 
makeGCBean
Create a new GarbageCollectorMXBean.- Parameters:
 domainName- the domain name of the new beanname- the collector nameinternalID- an internal id number representing the collector- Returns:
 - the new GarbageCollectorMXBean
 
 - 
makeMemoryPoolBean
Create a new MemoryPoolMXBean.- Parameters:
 name- the name of the memory pooltype- the type of the memory poolinternalID- an internal id number representing the memory pool- Returns:
 - the new MemoryPoolMXBean
 
 - 
getMemoryManagerMXBeans
Retrieves the list of memory manager beans in the system.- Parameters:
 copy- indicates whether a copy of the list should be returned- Returns:
 - the list of 
MemoryManagerMXBeaninstances 
 - 
getGarbageCollectorMXBeans
Returns a list of all of the instances ofGarbageCollectorMXBeanin this virtual machine. Owing to the dynamic nature of this kind ofMXBean, it is possible that instances may be created or destroyed between the invocation and return of this method.- Returns:
 - a list of all known 
GarbageCollectorMXBeans in this virtual machine. 
 - 
getMemoryPoolMXBeans
Retrieves the list of memory pool beans managed by this manager.- Parameters:
 copy- indicates whether a copy of the list should be returned- Returns:
 - the list of 
MemoryPoolMXBeaninstances 
 - 
gc
public void gc()Requests the virtual machine to run the system garbage collector.- Specified by:
 gcin interfaceMemoryMXBean
 - 
getHeapMemoryUsage
Returns the current memory usage of the heap for both live objects and for objects no longer in use which are awaiting garbage collection.- Specified by:
 getHeapMemoryUsagein interfaceMemoryMXBean- Returns:
 - an instance of 
MemoryUsagewhich can be interrogated by the caller. 
 - 
getNonHeapMemoryUsage
Returns the current non-heap memory usage for the virtual machine.- Specified by:
 getNonHeapMemoryUsagein interfaceMemoryMXBean- Returns:
 - an instance of 
MemoryUsagewhich can be interrogated by the caller. 
 - 
getObjectPendingFinalizationCount
public int getObjectPendingFinalizationCount()Returns the number of objects in the virtual machine that are awaiting finalization. The returned value should only be used as an approximate guide.- Specified by:
 getObjectPendingFinalizationCountin interfaceMemoryMXBean- Returns:
 - the number of objects awaiting finalization.
 
 - 
isVerbose
public boolean isVerbose()Returns a boolean indication of whether or not the memory system is producing verbose output.- Specified by:
 isVerbosein interfaceMemoryMXBean- Returns:
 trueif verbose output is being produced ;falseotherwise.
 - 
setVerbose
public void setVerbose(boolean value) Updates the verbose output setting of the memory system.- Specified by:
 setVerbosein interfaceMemoryMXBean- Parameters:
 value-trueenables verbose output ;falsedisables verbose output.
 - 
getMaxHeapSizeLimit
public long getMaxHeapSizeLimit() - 
getMaxHeapSize
public long getMaxHeapSize() - 
getMinHeapSize
public long getMinHeapSize() - 
setMaxHeapSize
public void setMaxHeapSize(long size)  - 
isSetMaxHeapSizeSupported
public boolean isSetMaxHeapSizeSupported() - 
getNotificationInfo
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.
- Specified by:
 getNotificationInfoin interfaceNotificationBroadcaster- Returns:
 - the array of possible notifications.
 
 - 
getGCMode
 - 
getGCMainThreadCpuUsed
public long getGCMainThreadCpuUsed() - 
getGCWorkerThreadsCpuUsed
public long getGCWorkerThreadsCpuUsed() - 
getMaximumGCThreads
public int getMaximumGCThreads() - 
getCurrentGCThreads
public int getCurrentGCThreads() - 
getObjectName
Returns anObjectNameinstance representing the object name of this platform managed object.- Specified by:
 getObjectNamein interfacePlatformManagedObject- Returns:
 - an 
ObjectNameinstance representing the object name of this platform managed object. 
 - 
removeNotificationListener
public final void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.- Specified by:
 removeNotificationListenerin interfaceNotificationBroadcaster- Parameters:
 listener- A listener that was previously added to this MBean.- Throws:
 ListenerNotFoundException- The listener is not registered with the MBean.- See Also:
 
 - 
removeNotificationListener
public final void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException Removes a listener from this MBean. The MBean must have a listener that exactly matches the given
listener,filter, andhandbackparameters. If there is more than one such listener, only one is removed.The
filterandhandbackparameters may be null if and only if they are null in a listener to be removed.- Specified by:
 removeNotificationListenerin interfaceNotificationEmitter- Parameters:
 listener- A listener that was previously added to this MBean.filter- The filter that was specified when the listener was added.handback- The handback that was specified when the listener was added.- Throws:
 ListenerNotFoundException- The listener is not registered with the MBean, or it is not registered with the given filter and handback.
 - 
sendNotification
Send notifications to registered listeners.- Parameters:
 notification- a notification to be sent
 
 -