org.eclipse.jetty.monitor.thread
类 ThreadMonitorInfo

java.lang.Object
  继承者 org.eclipse.jetty.monitor.thread.ThreadMonitorInfo

public class ThreadMonitorInfo
extends Object


构造方法摘要
ThreadMonitorInfo(Thread thread)
          Instantiates a new thread monitor info.
 
方法摘要
 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.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ThreadMonitorInfo

public ThreadMonitorInfo(Thread thread)
Instantiates a new thread monitor info.

参数:
thread - the thread this object is created for
方法详细信息

getThreadId

public long getThreadId()
返回:
Id of the thread

getThreadName

public String getThreadName()
Gets the thread name.

返回:
the thread name

getThreadState

public String getThreadState()
Gets the thread state.

返回:
the thread state

getStackTrace

public StackTraceElement[] getStackTrace()
Gets the stack trace.

返回:
the stack trace

setStackTrace

public void setStackTrace(StackTraceElement[] stackTrace)
Sets the stack trace.

参数:
stackTrace - the new stack trace

isSpinning

public boolean isSpinning()
Checks if is spinning.

返回:
true, if is spinning

setSpinning

public void setSpinning(boolean value)
Sets the spinning flag.

参数:
value - the new value

setTraceCount

public void setTraceCount(int traceCount)
Sets the trace count.

参数:
traceCount - the new trace count

getTraceCount

public int getTraceCount()
Gets the trace count.

返回:
the trace count

getCpuTime

public long getCpuTime()
返回:
the CPU time of the thread

setCpuTime

public void setCpuTime(long ns)
Set the CPU time.

参数:
ns - new CPU time

getSampleTime

public long getSampleTime()
返回:
the time of sample

setSampleTime

public void setSampleTime(long ns)
Sets the sample time.

参数:
ns - the time of sample

getCpuUtilization

public float getCpuUtilization()
Gets the CPU utilization.

返回:
the CPU utilization percentage


Copyright © 2013. All Rights Reserved.