352684 setters
This commit is contained in:
parent
3302d54bab
commit
42b9baa4db
|
@ -5,7 +5,11 @@
|
|||
<!-- Create Thread Monitor, and add to the Server as a lifecycle -->
|
||||
<Call name="addBean">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.monitor.ThreadMonitor"/>
|
||||
<New class="org.eclipse.jetty.monitor.ThreadMonitor">
|
||||
<Set name="scanInterval">2000</Set>
|
||||
<Set name="busyThreshold">90</Set>
|
||||
<Set name="stackDepth">3</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Configure>
|
||||
|
|
|
@ -52,21 +52,21 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
|
|||
*/
|
||||
public ThreadMonitor() throws Exception
|
||||
{
|
||||
this(5, 95, 3);
|
||||
this(5000, 95, 3);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Instantiates a new thread monitor.
|
||||
*
|
||||
* @param interval scan interval
|
||||
* @param intervalMs scan interval
|
||||
* @param threshold busy threshold
|
||||
* @param depth stack compare depth
|
||||
* @throws Exception
|
||||
*/
|
||||
public ThreadMonitor(int interval, int threshold, int depth) throws Exception
|
||||
public ThreadMonitor(int intervalMs, int threshold, int depth) throws Exception
|
||||
{
|
||||
_scanInterval = interval * 1000;
|
||||
_scanInterval = intervalMs;
|
||||
_busyThreshold = threshold;
|
||||
_stackDepth = depth;
|
||||
|
||||
|
@ -76,6 +76,9 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
|
|||
init();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart()
|
||||
|
@ -90,6 +93,42 @@ public class ThreadMonitor extends AbstractLifeCycle implements Runnable
|
|||
Log.info("Thread Monitor started successfully");
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public int getScanInterval()
|
||||
{
|
||||
return _scanInterval;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public void setScanInterval(int ms)
|
||||
{
|
||||
_scanInterval = ms;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public int getBusyThreshold()
|
||||
{
|
||||
return _busyThreshold;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public void setBusyThreshold(int percent)
|
||||
{
|
||||
_busyThreshold = percent;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public int getStackDepth()
|
||||
{
|
||||
return _stackDepth;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public void setStackDepth(int stackDepth)
|
||||
{
|
||||
_stackDepth = stackDepth;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop()
|
||||
|
|
Loading…
Reference in New Issue