|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.cunit.record.graph.ThreadInfo
public class ThreadInfo
Information about a thread. Essentially captures the information that a ThreadReference contains, but this class allows the information to be stored so that the monitored VM can be resumed.
| Field Summary | |
|---|---|
(package private) java.lang.Long |
_contendedLockId
Unique id of the lock the thread is waiting for, or null if none. |
(package private) java.lang.String |
_name
Name of the thread. |
(package private) java.util.Set<java.lang.Long> |
_ownedLockIds
Set of the unique ids of locks owned. |
(package private) java.util.LinkedList<StackFrameInfo> |
_stackFrame
List of state frame entries. |
(package private) int |
_status
Thread Status. |
(package private) long |
_threadID
Unique ID of thread. |
| Constructor Summary | |
|---|---|
ThreadInfo(long uniqueId,
int status,
java.lang.String name,
java.lang.Long contendedLockId,
java.util.Set<java.lang.Long> ownedLockIds,
java.util.List<StackFrameInfo> stackFrame)
Constructor for thread info. |
|
ThreadInfo(com.sun.jdi.ThreadReference tRef)
Constructor for thread info. |
|
| Method Summary | |
|---|---|
java.lang.Long |
getContendedLockID()
Returns the id of the contended lock, or null if none. |
java.lang.String |
getName()
Returns the name of the thread. |
java.util.Set<java.lang.Long> |
getOwnedLockIDs()
Returns a set with the ids of the owned locks. |
java.util.List<StackFrameInfo> |
getStackFrame()
Returns a list with state frame information. |
int |
getStatus()
Returns the status of the thread. |
long |
getThreadID()
Returns the unique id of this thread. |
void |
setContendedLockId(java.lang.Long contendedLockId)
Sets the id of the contented lock, or null if none. |
void |
setStatus(int status)
Sets the status of the thread. |
java.lang.String |
toString()
Returns a string representation of the object. |
java.lang.String |
toStringExtended(java.util.Map<java.lang.Long,LockInfo> lockInfo)
Returns a very verbose string representation of the object. |
java.lang.String |
toStringVerbose()
Returns a compact string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
long _threadID
int _status
java.lang.String _name
java.lang.Long _contendedLockId
java.util.Set<java.lang.Long> _ownedLockIds
java.util.LinkedList<StackFrameInfo> _stackFrame
| Constructor Detail |
|---|
public ThreadInfo(long uniqueId,
int status,
java.lang.String name,
java.lang.Long contendedLockId,
java.util.Set<java.lang.Long> ownedLockIds,
java.util.List<StackFrameInfo> stackFrame)
uniqueId - thread's unique idstatus - thread statusname - thread namecontendedLockId - id of contended lockownedLockIds - set of ids of ownned locksstackFrame - list of state frame infospublic ThreadInfo(com.sun.jdi.ThreadReference tRef)
tRef - Thread Reference| Method Detail |
|---|
public long getThreadID()
getThreadID in interface IThreadInfopublic int getStatus()
public void setStatus(int status)
status - new statuspublic java.lang.String getName()
public java.lang.Long getContendedLockID()
public void setContendedLockId(java.lang.Long contendedLockId)
contendedLockId - new lock id, or null if nonepublic java.util.Set<java.lang.Long> getOwnedLockIDs()
public java.util.List<StackFrameInfo> getStackFrame()
public java.lang.String toString()
toString in interface IThreadInfotoString in class java.lang.Objectpublic java.lang.String toStringExtended(java.util.Map<java.lang.Long,LockInfo> lockInfo)
lockInfo - map from unique ids to lock information
public java.lang.String toStringVerbose()
toStringVerbose in interface IVerboseToString
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||