Interface ThreadData
- All Superinterfaces:
TimeData
- All Known Implementing Classes:
ThreadDataImpl
This class represents a particular thread within the monitored application.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the object whose monitor this thread is waiting to enter or regain.Returns the name of the thread that has the lock on the monitor that this thread is waiting to enter or regain.Returns an array which contains information about the object monitors currently locked by this thread.LockInfo[]Returns an array of synchronizer objects that are currently owned (exclusively) by this thread.getName()Returns the name of this thread.String[]Returns the monitors that are owned by this thread.Returns the stack trace of this thread.getState()Returns the state of this thread.
-
Method Details
-
getName
String getName()Returns the name of this thread.- Returns:
- the name of this thread.
-
getState
Thread.State getState()Returns the state of this thread. For example, the thread could be blocked or waiting.- Returns:
- the state of this thread.
-
getOwnedMonitors
String[] getOwnedMonitors()Returns the monitors that are owned by this thread.- Returns:
- a String array representing the names of monitors that are owned by this thread, or an empty String array if this thread does not own any monitors.
-
getContendedMonitor
String getContendedMonitor()Returns the name of the object whose monitor this thread is waiting to enter or regain.- Returns:
- a String representation of the contended monitor, or
nullif this thread is not waiting for a monitor.
-
getContendedMonitorOwner
String getContendedMonitorOwner()Returns the name of the thread that has the lock on the monitor that this thread is waiting to enter or regain.- Returns:
- the name of the thread that has the lock.
-
getStackTrace
StackTraceElement[] getStackTrace()Returns the stack trace of this thread. The first element of the array represents the top of the stack and the last element of the array represents the bottom of the stack.- Returns:
- the stack trace of this thread.
-
getLockedMonitors
MonitorInfo[] getLockedMonitors()Returns an array which contains information about the object monitors currently locked by this thread.- Returns:
- the locked object monitors
-
getLockedSynchronizers
LockInfo[] getLockedSynchronizers()Returns an array of synchronizer objects that are currently owned (exclusively) by this thread.- Returns:
- Array of synchronizers
-