com.ibm.java.diagnostics.healthcenter.api.threads
Interface ThreadsData
-
- All Superinterfaces:
- HealthCenterData, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
public interface ThreadsData extends HealthCenterData
This class represents a snapshot of all the threads in the monitored application and their current status
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
THREADDATA
Used to get only Threads Data when comparing againstNotificationListener.getUserData()
static java.lang.String
THREADSCOUNTDATA
Used to get only Threads Count Data when comparing againstNotificationListener.getUserData()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
addThreadListener(ThreadEventListener listener)
Add a listener for notification of when a thread event occursboolean
deadlockDetected()
Returns whether a deadlock scenario has been detected in the monitored threads.java.util.HashMap<java.lang.Long,ThreadData[]>
getAllThreads()
Returns all the threads in the monitored application over time.ThreadData[]
getLatestThreads()
Returns the latest set of threads in the monitored application.CountData[]
getThreadCounts()
Returns the number of threads in the application over time.ThreadData[]
getThreads()
Returns all the threads that are currently in the monitored application.void
removeThreadListener(ThreadEventListener listener)
Remove one of registered listeners.-
Methods inherited from interface com.ibm.java.diagnostics.healthcenter.api.HealthCenterData
getAllRecommendations, getCriticalRecommendations, getHealthyRecommendations, getInformationalRecommendations, getWarningRecommendations, startNotifying, startNotifying
-
-
-
-
Field Detail
-
THREADDATA
static final java.lang.String THREADDATA
Used to get only Threads Data when comparing againstNotificationListener.getUserData()
- See Also:
- Constant Field Values
-
THREADSCOUNTDATA
static final java.lang.String THREADSCOUNTDATA
Used to get only Threads Count Data when comparing againstNotificationListener.getUserData()
- See Also:
- Constant Field Values
-
-
Method Detail
-
getThreads
ThreadData[] getThreads()
Returns 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- Returns:
- an array of ThreadData objects containing the current threads
-
getThreadCounts
CountData[] getThreadCounts()
Returns 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- 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.
-
deadlockDetected
boolean deadlockDetected()
Returns whether a deadlock scenario has been detected in the monitored threads.- Returns:
true
if a deadlock scenario has been detected, otherwisefalse
.
-
getLatestThreads
ThreadData[] getLatestThreads()
Returns 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- Returns:
- an array of ThreadData objects containing the latest threads
-
getAllThreads
java.util.HashMap<java.lang.Long,ThreadData[]> getAllThreads()
Returns all the threads in the monitored application over time.- Returns:
- a HashMap containing the time of the thread snapshot and an array of ThreadData objects
-
addThreadListener
void addThreadListener(ThreadEventListener listener)
Add a listener for notification of when a thread event occurs- Parameters:
implementation
- of the ThreadEventListener class
-
removeThreadListener
void removeThreadListener(ThreadEventListener listener)
Remove one of registered listeners.- Parameters:
implementation
- of the ThreadEventListener class
-
-