Class ThreadsDataImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
com.ibm.java.diagnostics.healthcenter.api.impl.HealthCenterDataImpl
com.ibm.java.diagnostics.healthcenter.api.threads.impl.ThreadsDataImpl
- All Implemented Interfaces:
HealthCenterData,ThreadsData,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.threads.ThreadsData
THREADDATA, THREADSCOUNTDATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddThreadListener(ThreadEventListener listener) Add a listener for notification of when a thread event occursbooleanReturns whether a deadlock scenario has been detected in the monitored threads.Returns all the threads in the monitored application over time.Returns the latest set of threads in the monitored application.protected Stringprotected StringReturns the number of threads in the application over time.Returns all the threads that are currently in the monitored application.voidremoveThreadListener(ThreadEventListener 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
-
ThreadsDataImpl
public ThreadsDataImpl(com.ibm.java.diagnostics.common.datamodel.data.Data data)
-
-
Method Details
-
getLatestThreads
Description copied from interface:ThreadsDataReturns the latest set of threads in the monitored application. 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:
getLatestThreadsin interfaceThreadsData- Returns:
- an array of ThreadData objects containing the latest threads
-
getThreads
Description copied from interface:ThreadsDataReturns all the threads that are currently in the monitored application. 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:
getThreadsin interfaceThreadsData- Returns:
- an array of ThreadData objects containing the current threads
-
getThreadCounts
Description copied from interface:ThreadsDataReturns the number of threads in the application over time. 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:
getThreadCountsin interfaceThreadsData- Returns:
- an array of CountData objects. Each object contains a time and the number of threads that were in the monitored application at that time.
-
getRecommendationLabel
- Specified by:
getRecommendationLabelin classHealthCenterDataImpl
-
getSubsystemLabel
- Specified by:
getSubsystemLabelin classHealthCenterDataImpl
-
deadlockDetected
public boolean deadlockDetected()Description copied from interface:ThreadsDataReturns whether a deadlock scenario has been detected in the monitored threads.- Specified by:
deadlockDetectedin interfaceThreadsData- Returns:
trueif a deadlock scenario has been detected, otherwisefalse.
-
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.
-
getAllThreads
Description copied from interface:ThreadsDataReturns all the threads in the monitored application over time.- Specified by:
getAllThreadsin interfaceThreadsData- Returns:
- a HashMap containing the time of the thread snapshot and an array of ThreadData objects
-
addThreadListener
Description copied from interface:ThreadsDataAdd a listener for notification of when a thread event occurs- Specified by:
addThreadListenerin interfaceThreadsData
-
removeThreadListener
Description copied from interface:ThreadsDataRemove one of registered listeners.- Specified by:
removeThreadListenerin interfaceThreadsData
-