org.eclipse.jetty.monitor.thread
Class ThreadMonitorInfo

java.lang.Object
  extended by org.eclipse.jetty.monitor.thread.ThreadMonitorInfo

public class ThreadMonitorInfo
extends Object


Constructor Summary
ThreadMonitorInfo(Thread thread)
          Instantiates a new thread monitor info.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadMonitorInfo

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

Parameters:
thread - the thread this object is created for
Method Detail

getThreadId

public long getThreadId()
Returns:
Id of the thread

getThreadName

public String getThreadName()
Gets the thread name.

Returns:
the thread name

getThreadState

public String getThreadState()
Gets the thread state.

Returns:
the thread state

getStackTrace

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

Returns:
the stack trace

setStackTrace

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

Parameters:
stackTrace - the new stack trace

isSpinning

public boolean isSpinning()
Checks if is spinning.

Returns:
true, if is spinning

setSpinning

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

Parameters:
value - the new value

setTraceCount

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

Parameters:
traceCount - the new trace count

getTraceCount

public int getTraceCount()
Gets the trace count.

Returns:
the trace count

getCpuTime

public long getCpuTime()
Returns:
the CPU time of the thread

setCpuTime

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

Parameters:
ns - new CPU time

getSampleTime

public long getSampleTime()
Returns:
the time of sample

setSampleTime

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

Parameters:
ns - the time of sample

getCpuUtilization

public float getCpuUtilization()
Gets the CPU utilization.

Returns:
the CPU utilization percentage


Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.