- java.lang.Object
-
- com.ibm.java.lang.management.internal.MemoryMXBeanImpl
-
- com.ibm.lang.management.internal.ExtendedMemoryMXBeanImpl
-
- All Implemented Interfaces:
MemoryMXBean
,MemoryMXBean
,PlatformManagedObject
,NotificationBroadcaster
,NotificationEmitter
public final class ExtendedMemoryMXBeanImpl extends com.ibm.java.lang.management.internal.MemoryMXBeanImpl implements MemoryMXBean
Runtime type forMemoryMXBean
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
Adds a listener to this MBean.static ExtendedMemoryMXBeanImpl
getInstance()
long
getTotalPhysicalMemory()
Deprecated, for removal: This API element is subject to removal in a future version.long
getTotalPhysicalMemorySize()
Deprecated, for removal: This API element is subject to removal in a future version.long
getUsedPhysicalMemory()
Deprecated, for removal: This API element is subject to removal in a future version.void
removeNotificationListener(NotificationListener listener)
Removes a listener from this MBean.void
removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
Removes a listener from this MBean.void
sendNotification(Notification notification)
Send notifications to registered listeners.protected void
startNotificationThread()
Ensure the notification thread is running.-
Methods declared in class com.ibm.java.lang.management.internal.MemoryMXBeanImpl
gc, getCurrentGCThreads, getGarbageCollectorMXBeans, getGCMainThreadCpuUsed, getGCMasterThreadCpuUsed, getGCMode, getGCSlaveThreadsCpuUsed, getGCWorkerThreadsCpuUsed, getHeapMemoryUsage, getMaxHeapSize, getMaxHeapSizeLimit, getMaximumGCThreads, getMemoryManagerMXBeans, getMemoryPoolMXBeans, getMinHeapSize, getNonHeapMemoryUsage, getNotificationInfo, getObjectName, getObjectPendingFinalizationCount, getSharedClassCacheFreeSpace, getSharedClassCacheMaxAotBytes, getSharedClassCacheMaxAotUnstoredBytes, getSharedClassCacheMaxJitDataBytes, getSharedClassCacheMaxJitDataUnstoredBytes, getSharedClassCacheMinAotBytes, getSharedClassCacheMinJitDataBytes, getSharedClassCacheSize, getSharedClassCacheSoftmxBytes, getSharedClassCacheSoftmxUnstoredBytes, isSetMaxHeapSizeSupported, isVerbose, makeGCBean, makeMemoryPoolBean, setMaxHeapSize, setSharedClassCacheMaxAotBytes, setSharedClassCacheMaxJitDataBytes, setSharedClassCacheMinAotBytes, setSharedClassCacheMinJitDataBytes, setSharedClassCacheSoftmxBytes, setVerbose
-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.lang.management.MemoryMXBean
getCurrentGCThreads, getGCMainThreadCpuUsed, getGCMasterThreadCpuUsed, getGCMode, getGCSlaveThreadsCpuUsed, getGCWorkerThreadsCpuUsed, getMaxHeapSize, getMaxHeapSizeLimit, getMaximumGCThreads, getMinHeapSize, getSharedClassCacheFreeSpace, getSharedClassCacheMaxAotBytes, getSharedClassCacheMaxAotUnstoredBytes, getSharedClassCacheMaxJitDataBytes, getSharedClassCacheMaxJitDataUnstoredBytes, getSharedClassCacheMinAotBytes, getSharedClassCacheMinJitDataBytes, getSharedClassCacheSize, getSharedClassCacheSoftmxBytes, getSharedClassCacheSoftmxUnstoredBytes, isSetMaxHeapSizeSupported, setMaxHeapSize, setSharedClassCacheMaxAotBytes, setSharedClassCacheMaxJitDataBytes, setSharedClassCacheMinAotBytes, setSharedClassCacheMinJitDataBytes, setSharedClassCacheSoftmxBytes
-
Methods declared in interface java.lang.management.MemoryMXBean
gc, getHeapMemoryUsage, getNonHeapMemoryUsage, getObjectPendingFinalizationCount, isVerbose, setVerbose
-
Methods declared in interface java.lang.management.PlatformManagedObject
getObjectName
-
-
-
-
Method Detail
-
getInstance
public static ExtendedMemoryMXBeanImpl getInstance()
-
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
Adds a listener to this MBean.- Specified by:
addNotificationListener
in 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:
NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)
-
startNotificationThread
protected void startNotificationThread()
Ensure the notification thread is running.- Overrides:
startNotificationThread
in classcom.ibm.java.lang.management.internal.MemoryMXBeanImpl
-
getTotalPhysicalMemory
@Deprecated(forRemoval=true, since="1.8") public long getTotalPhysicalMemory()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated. Use com.sun.management.OperatingSystemMXBean.getTotalPhysicalMemorySize().
-
getTotalPhysicalMemorySize
@Deprecated(forRemoval=true, since="19") public long getTotalPhysicalMemorySize()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getUsedPhysicalMemory
@Deprecated(forRemoval=true, since="19") public long getUsedPhysicalMemory()
Deprecated, for removal: This API element is subject to removal in a future version.
-
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:
removeNotificationListener
in interfaceNotificationBroadcaster
- Parameters:
listener
- A listener that was previously added to this MBean.- Throws:
ListenerNotFoundException
- The listener is not registered with the MBean.- See Also:
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
,NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
-
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
, andhandback
parameters. If there is more than one such listener, only one is removed.The
filter
andhandback
parameters may be null if and only if they are null in a listener to be removed.- Specified by:
removeNotificationListener
in 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
public final void sendNotification(Notification notification)
Send notifications to registered listeners.- Parameters:
notification
- a notification to be sent
-
-