Interface ThreadsData

All Superinterfaces:
HealthCenterData, NotificationBroadcaster, NotificationEmitter
All Known Implementing Classes:
ThreadsDataImpl

public interface ThreadsData extends HealthCenterData
This class represents a snapshot of all the threads in the monitored application and their current status
  • Field Details

    • THREADDATA

      static final String THREADDATA
      Used to get only Threads Data when comparing against NotificationListener.getUserData()
      See Also:
    • THREADSCOUNTDATA

      static final String THREADSCOUNTDATA
      Used to get only Threads Count Data when comparing against NotificationListener.getUserData()
      See Also:
  • Method Details

    • 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, otherwise false.
    • 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

      HashMap<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