|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.monitor.ThreadMonitor
public class ThreadMonitor
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
|---|
AbstractLifeCycle.AbstractLifeCycleListener |
| Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
|---|
LifeCycle.Listener |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
|---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
| Constructor Summary | |
|---|---|
ThreadMonitor()
Instantiates a new thread monitor. |
|
ThreadMonitor(int intervalMs)
Instantiates a new thread monitor. |
|
ThreadMonitor(int intervalMs,
int threshold)
Instantiates a new thread monitor. |
|
ThreadMonitor(int intervalMs,
int threshold,
int depth)
Instantiates a new thread monitor. |
|
ThreadMonitor(int intervalMs,
int threshold,
int depth,
int trail)
Instantiates a new thread monitor. |
|
| Method Summary | |
|---|---|
void |
doStart()
|
void |
doStop()
|
protected long[] |
getAllThreadIds()
Retrieve all avaliable thread ids |
int |
getBusyThreshold()
Gets the busy threshold. |
Dumpable |
getDumpable()
|
int |
getLogInterval()
Gets the log interval. |
int |
getLogThreshold()
Gets the log threshold. |
int |
getScanInterval()
Gets the scan interval. |
int |
getStackDepth()
Gets the stack depth. |
protected long |
getThreadCpuTime(long id)
Retrieve the cpu time for specified thread. |
int |
getTrailLength()
Gets the stack trace trail length. |
protected void |
init()
Initialize JMX objects. |
void |
logCpuUsage(int frequencyMs,
int thresholdPercent)
Enable logging of CPU usage. |
protected void |
logThreadInfo(boolean logAll)
|
void |
run()
|
void |
setBusyThreshold(int percent)
Sets the busy threshold. |
void |
setDumpable(Dumpable dumpable)
|
void |
setLogInterval(int ms)
Sets the log interval. |
void |
setLogThreshold(int percent)
Sets the log threshold. |
void |
setScanInterval(int ms)
Sets the scan interval. |
void |
setStackDepth(int stackDepth)
Sets the stack depth. |
void |
setTrailLength(int trailLength)
Sets the stack trace trail length. |
| Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
|---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadMonitor()
throws java.lang.Exception
java.lang.Exception
public ThreadMonitor(int intervalMs)
throws java.lang.Exception
intervalMs - scan interval
java.lang.Exception
public ThreadMonitor(int intervalMs,
int threshold)
throws java.lang.Exception
intervalMs - scan intervalthreshold - busy threshold
java.lang.Exception
public ThreadMonitor(int intervalMs,
int threshold,
int depth)
throws java.lang.Exception
intervalMs - scan intervalthreshold - busy thresholddepth - stack compare depth
java.lang.Exception
public ThreadMonitor(int intervalMs,
int threshold,
int depth,
int trail)
throws java.lang.Exception
intervalMs - scan intervalthreshold - busy thresholddepth - stack compare depthtrail - length of stack trail
java.lang.Exception| Method Detail |
|---|
public int getScanInterval()
public void setScanInterval(int ms)
ms - the new scan intervalpublic int getLogInterval()
public void setLogInterval(int ms)
ms - the new log intervalpublic int getBusyThreshold()
public void setBusyThreshold(int percent)
percent - the new busy thresholdpublic int getLogThreshold()
public void setLogThreshold(int percent)
percent - the new log thresholdpublic int getStackDepth()
public void setStackDepth(int stackDepth)
stackDepth - the new stack depthpublic void setTrailLength(int trailLength)
trailLength - the new trail lengthpublic int getTrailLength()
public void logCpuUsage(int frequencyMs,
int thresholdPercent)
frequencyMs - the logging frequencythresholdPercent - the logging thresholdpublic Dumpable getDumpable()
Dumpable that is dumped whenever spinning threads are detectedpublic void setDumpable(Dumpable dumpable)
dumpable - A Dumpable that is dumped whenever spinning threads are detectedpublic void doStart()
doStart in class AbstractLifeCycleAbstractLifeCycle.doStart()public void doStop()
doStop in class AbstractLifeCycleAbstractLifeCycle.doStop()protected long[] getAllThreadIds()
protected long getThreadCpuTime(long id)
id - thread id
protected void init()
public void run()
run in interface java.lang.RunnableRunnable.run()protected void logThreadInfo(boolean logAll)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||