|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.monitor.ThreadMonitor
public class ThreadMonitor
| 嵌套类摘要 |
|---|
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口 |
|---|
AbstractLifeCycle.AbstractLifeCycleListener |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口 |
|---|
LifeCycle.Listener |
| 字段摘要 |
|---|
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段 |
|---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
| 构造方法摘要 | |
|---|---|
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. |
|
| 方法摘要 | |
|---|---|
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. |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法 |
|---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ThreadMonitor()
throws Exception
Exception
public ThreadMonitor(int intervalMs)
throws Exception
intervalMs - scan interval
Exception
public ThreadMonitor(int intervalMs,
int threshold)
throws Exception
intervalMs - scan intervalthreshold - busy threshold
Exception
public ThreadMonitor(int intervalMs,
int threshold,
int depth)
throws Exception
intervalMs - scan intervalthreshold - busy thresholddepth - stack compare depth
Exception
public ThreadMonitor(int intervalMs,
int threshold,
int depth,
int trail)
throws Exception
intervalMs - scan intervalthreshold - busy thresholddepth - stack compare depthtrail - length of stack trail
Exception| 方法详细信息 |
|---|
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()
AbstractLifeCycle 中的 doStartAbstractLifeCycle.doStart()public void doStop()
AbstractLifeCycle 中的 doStopAbstractLifeCycle.doStop()protected long[] getAllThreadIds()
protected long getThreadCpuTime(long id)
id - thread id
protected void init()
public void run()
Runnable 中的 runRunnable.run()protected void logThreadInfo(boolean logAll)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||