public class ThreadMonitorInfo extends Object
Constructor and Description |
---|
ThreadMonitorInfo(Thread thread)
Instantiates a new thread monitor info.
|
Modifier and Type | Method and Description |
---|---|
long |
getCpuTime() |
float |
getCpuUtilization()
Gets the CPU utilization.
|
long |
getSampleTime() |
StackTraceElement[] |
getStackTrace()
Gets the stack trace.
|
long |
getThreadId() |
String |
getThreadName()
Gets the thread name.
|
String |
getThreadState()
Gets the thread state.
|
int |
getTraceCount()
Gets the trace count.
|
boolean |
isSpinning()
Checks if is spinning.
|
void |
setCpuTime(long ns)
Set the CPU time.
|
void |
setSampleTime(long ns)
Sets the sample time.
|
void |
setSpinning(boolean value)
Sets the spinning flag.
|
void |
setStackTrace(StackTraceElement[] stackTrace)
Sets the stack trace.
|
void |
setTraceCount(int traceCount)
Sets the trace count.
|
public ThreadMonitorInfo(Thread thread)
thread
- the thread this object is created forpublic long getThreadId()
public String getThreadName()
public String getThreadState()
public StackTraceElement[] getStackTrace()
public void setStackTrace(StackTraceElement[] stackTrace)
stackTrace
- the new stack tracepublic boolean isSpinning()
public void setSpinning(boolean value)
value
- the new valuepublic void setTraceCount(int traceCount)
traceCount
- the new trace countpublic int getTraceCount()
public long getCpuTime()
public void setCpuTime(long ns)
ns
- new CPU timepublic long getSampleTime()
public void setSampleTime(long ns)
ns
- the time of samplepublic float getCpuUtilization()
Copyright © 1995-2015 Webtide. All Rights Reserved.