|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.debug.ThreadSnapshot
public class ThreadSnapshot
A serializable and immutable view of a Thread at a particular time.
| Constructor Summary | |
|---|---|
ThreadSnapshot()
|
|
ThreadSnapshot(Thread t)
|
|
| Method Summary | |
|---|---|
StackTraceElement |
callingLocation()
The second stack element at snapshot time, or null if unavailable. |
long |
getId()
The result of Thread.getId() at the snapshot time. |
String |
getName()
The result of Thread.getName() at the snapshot time. |
int |
getPriority()
The result of Thread.getPriority() at the snapshot time. |
SizedIterable<StackTraceElement> |
getStackTrace()
The stack trace at creation time, as returned by Thread.getStackTrace(). |
Thread.State |
getState()
The result of Thread.getState() at the snapshot time. |
String |
getThreadGroup()
The name of t's ThreadGroup at the snapshot time, as returned by Thread.getThreadGroup(),
or null if it did not have one. |
boolean |
isAlive()
The result of Thread.isAlive() at the snapshot time. |
boolean |
isDaemon()
The result of Thread.isDaemon() at the snapshot time. |
boolean |
isInterrupted()
The result of Thread.isInterrupted() at the snapshot time. |
StackTraceElement |
runningLocation()
The top of the stack at snapshot time, or null if unavailable. |
Date |
snapshotTime()
The time at which the snapshot was taken. |
String |
toString()
Produce a string representation of the thread, as would be returned by Thread.toString() at
snapshot time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadSnapshot()
public ThreadSnapshot(Thread t)
| Method Detail |
|---|
public String getName()
Thread.getName() at the snapshot time.
public long getId()
Thread.getId() at the snapshot time.
public boolean isDaemon()
Thread.isDaemon() at the snapshot time.
public int getPriority()
Thread.getPriority() at the snapshot time.
public String getThreadGroup()
t's ThreadGroup at the snapshot time, as returned by Thread.getThreadGroup(),
or null if it did not have one.
public Date snapshotTime()
public SizedIterable<StackTraceElement> getStackTrace()
Thread.getStackTrace(). If the thread was
used to take a snapshot of itself, the relevant ThreadSnapshot invocations are hidden in the result.
Note that Thread.getStackTrace() does not guarantee complete results, and the trace may even
be empty.
public StackTraceElement runningLocation()
null if unavailable. If the thread was
used to take a snapshot of itself, the relevant ThreadSnapshot invocations are hidden in the result.
public StackTraceElement callingLocation()
null if unavailable. If the thread was
used to take a snapshot of itself, the relevant ThreadSnapshot invocations are hidden in the result.
public Thread.State getState()
Thread.getState() at the snapshot time.
public boolean isAlive()
Thread.isAlive() at the snapshot time.
public boolean isInterrupted()
Thread.isInterrupted() at the snapshot time.
public String toString()
Thread.toString() at
snapshot time.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||