Class LockingDataImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
com.ibm.java.diagnostics.healthcenter.api.impl.HealthCenterDataImpl
com.ibm.java.diagnostics.healthcenter.api.locking.impl.LockingDataImpl
- All Implemented Interfaces:
HealthCenterData,LockingData,NotificationBroadcaster,NotificationEmitter
-
Field Summary
Fields inherited from class com.ibm.java.diagnostics.healthcenter.api.impl.HealthCenterDataImpl
DEFAULT_NOTIFICATION, UNSETFields inherited from interface com.ibm.java.diagnostics.healthcenter.api.locking.LockingData
JAVAMONITORDATA, SYSTEMMONITORDATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLockingListener(LockingEventListener listener) Add a listener for notification of when a locking event occursGets an array of MonitorData objects representing locks taken by the application that is being monitored.Gets an array of MonitorData objects representing locks taken by the Java runtime environment.protected Stringprotected StringvoidremoveLockingListener(LockingEventListener listener) Remove one of registered listeners.voidStarts a thread which checks for changes in the data every 2000 milliseconds and sends notifications if an update has occurred.voidstartNotifying(long delay) Starts a thread which checks for changes in the data and sends notifications if an update has occurred.Methods inherited from class com.ibm.java.diagnostics.healthcenter.api.impl.HealthCenterDataImpl
convertSummaryToDouble, convertSummaryToInt, convertSummaryToLong, extractRate, findAllRecommendations, findRecommendations, getAllRecommendations, getCriticalRecommendations, getEventData, getHealthyRecommendations, getInformationalRecommendations, getJvmData, getMaxData, getMeanData, getMinData, getWarningRecommendations, setJvmData, stripPercentSymbolMethods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ibm.java.diagnostics.healthcenter.api.HealthCenterData
getAllRecommendations, getCriticalRecommendations, getHealthyRecommendations, getInformationalRecommendations, getWarningRecommendationsMethods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListenerMethods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
-
Constructor Details
-
LockingDataImpl
public LockingDataImpl(com.ibm.java.diagnostics.common.datamodel.data.Data data)
-
-
Method Details
-
getRecommendationLabel
- Specified by:
getRecommendationLabelin classHealthCenterDataImpl
-
getSubsystemLabel
- Specified by:
getSubsystemLabelin classHealthCenterDataImpl
-
getInflatedJavaMonitors
Description copied from interface:LockingDataGets an array of MonitorData objects representing locks taken by the application that is being monitored. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur- Specified by:
getInflatedJavaMonitorsin interfaceLockingData- Returns:
- an array of MonitorData objects.
-
getInflatedSystemMonitors
Description copied from interface:LockingDataGets an array of MonitorData objects representing locks taken by the Java runtime environment. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur- Specified by:
getInflatedSystemMonitorsin interfaceLockingData- Returns:
- an array of MonitorData objects.
-
startNotifying
public void startNotifying()Description copied from interface:HealthCenterDataStarts a thread which checks for changes in the data every 2000 milliseconds and sends notifications if an update has occurred. To handle these notifications, aNotificationListenerneeds to be added to the object the thread is being started from.- Specified by:
startNotifyingin interfaceHealthCenterData
-
startNotifying
public void startNotifying(long delay) Description copied from interface:HealthCenterDataStarts a thread which checks for changes in the data and sends notifications if an update has occurred. To handle these notifications, aNotificationListenerneeds to be added to the object the thread is being started from.- Specified by:
startNotifyingin interfaceHealthCenterData- Parameters:
delay- The number of milliseconds between each update. The default is 2000 milliseconds and anything below this will not be accepted.
-
addLockingListener
Description copied from interface:LockingDataAdd a listener for notification of when a locking event occurs- Specified by:
addLockingListenerin interfaceLockingData
-
removeLockingListener
Description copied from interface:LockingDataRemove one of registered listeners.- Specified by:
removeLockingListenerin interfaceLockingData
-