blob: 5c6bfd4337608c2e8efad44072222f6c8332571b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_92) on Thu Jun 07 14:26:28 EDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LowResourceMonitor (Jetty :: Project 9.3.24.v20180605 API)</title>
<meta name="date" content="2018-06-07">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LowResourceMonitor (Jetty :: Project 9.3.24.v20180605 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LowResourceMonitor.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/eclipse/jetty/server/LocalConnector.LocalEndPoint.html" title="class in org.eclipse.jetty.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/eclipse/jetty/server/MultiPartCleanerListener.html" title="class in org.eclipse.jetty.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/eclipse/jetty/server/LowResourceMonitor.html" target="_top">Frames</a></li>
<li><a href="LowResourceMonitor.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.classes.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.eclipse.jetty.server</div>
<h2 title="Class LowResourceMonitor" class="title">Class LowResourceMonitor</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">org.eclipse.jetty.util.component.AbstractLifeCycle</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.server.LowResourceMonitor</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../org/eclipse/jetty/util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></dd>
</dl>
<hr>
<br>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedObject.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedObject</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedObject.html#value--">value</a>="Monitor for low resource conditions and activate a low resource mode if detected")
public class <span class="typeNameLabel">LowResourceMonitor</span>
extends <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></pre>
<div class="block">A monitor for low resources
<p>
An instance of this class will monitor all the connectors of a server (or a set of connectors
configured with <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMonitoredConnectors-java.util.Collection-"><code>setMonitoredConnectors(Collection)</code></a>) for a low resources state.
<p>
Low resources can be detected by:
<ul>
<li><a href="../../../../org/eclipse/jetty/util/thread/ThreadPool.html#isLowOnThreads--"><code>ThreadPool.isLowOnThreads()</code></a> if <a href="../../../../org/eclipse/jetty/server/Connector.html#getExecutor--"><code>Connector.getExecutor()</code></a> is
an instance of <a href="../../../../org/eclipse/jetty/util/thread/ThreadPool.html" title="interface in org.eclipse.jetty.util.thread"><code>ThreadPool</code></a> and <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMonitorThreads-boolean-"><code>setMonitorThreads(boolean)</code></a> is true.<li>
<li>If <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxMemory-long-"><code>setMaxMemory(long)</code></a> is non zero then low resources is detected if the JVMs
<code>Runtime</code> instance has <code>Runtime.totalMemory()</code> minus <code>Runtime.freeMemory()</code>
greater than <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxMemory--"><code>getMaxMemory()</code></a></li>
<li>If <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxConnections-int-"><code>setMaxConnections(int)</code></a> is non zero then low resources is dected if the total number
of connections exceeds <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxConnections--"><code>getMaxConnections()</code></a></li>
</ul>
<p>
Once low resources state is detected, the cause is logged and all existing connections returned
by <a href="../../../../org/eclipse/jetty/server/Connector.html#getConnectedEndPoints--"><code>Connector.getConnectedEndPoints()</code></a> have <a href="../../../../org/eclipse/jetty/io/EndPoint.html#setIdleTimeout-long-"><code>EndPoint.setIdleTimeout(long)</code></a> set
to <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesIdleTimeout--"><code>getLowResourcesIdleTimeout()</code></a>. New connections are not affected, however if the low
resources state persists for more than <a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxLowResourcesTime--"><code>getMaxLowResourcesTime()</code></a>, then the
<a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesIdleTimeout--"><code>getLowResourcesIdleTimeout()</code></a> to all connections again. Once the low resources state is
cleared, the idle timeout is reset to the connector default given by <a href="../../../../org/eclipse/jetty/server/Connector.html#getIdleTimeout--"><code>Connector.getIdleTimeout()</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.AbstractLifeCycleListener.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle.AbstractLifeCycleListener</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.LifeCycle">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../../../../org/eclipse/jetty/util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></h3>
<code><a href="../../../../org/eclipse/jetty/util/component/LifeCycle.Listener.html" title="interface in org.eclipse.jetty.util.component">LifeCycle.Listener</a></code></li>
</ul>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#FAILED">FAILED</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#RUNNING">RUNNING</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#STARTED">STARTED</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#STARTING">STARTING</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#STOP_ON_FAILURE">STOP_ON_FAILURE</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#STOPPED">STOPPED</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#STOPPING">STOPPING</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#LowResourceMonitor-org.eclipse.jetty.server.Server-">LowResourceMonitor</a></span>(<a href="../../../../org/eclipse/jetty/server/Server.html" title="class in org.eclipse.jetty.server">Server</a>&nbsp;server)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#clearLowResources--">clearLowResources</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#doStart--">doStart</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#doStop--">doStop</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesIdleTimeout--">getLowResourcesIdleTimeout</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesReasons--">getLowResourcesReasons</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesStarted--">getLowResourcesStarted</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxConnections--">getMaxConnections</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxLowResourcesTime--">getMaxLowResourcesTime</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxMemory--">getMaxMemory</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMonitoredConnectors--">getMonitoredConnectors</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMonitoredOrServerConnectors--">getMonitoredOrServerConnectors</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMonitorThreads--">getMonitorThreads</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getPeriod--">getPeriod</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#isLowOnResources--">isLowOnResources</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#monitor--">monitor</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setLowResources--">setLowResources</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setLowResourcesIdleTimeout-int-">setLowResourcesIdleTimeout</a></span>(int&nbsp;lowResourcesIdleTimeoutMS)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxConnections-int-">setMaxConnections</a></span>(int&nbsp;maxConnections)</code>&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxLowResourcesTime-int-">setMaxLowResourcesTime</a></span>(int&nbsp;maxLowResourcesTimeMS)</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxMemory-long-">setMaxMemory</a></span>(long&nbsp;maxMemoryBytes)</code>&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMonitoredConnectors-java.util.Collection-">setMonitoredConnectors</a></span>(java.util.Collection&lt;<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>&gt;&nbsp;monitoredConnectors)</code>&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMonitorThreads-boolean-">setMonitorThreads</a></span>(boolean&nbsp;monitorThreads)</code>&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setPeriod-int-">setPeriod</a></span>(int&nbsp;periodMS)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#addLifeCycleListener-org.eclipse.jetty.util.component.LifeCycle.Listener-">addLifeCycleListener</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#getState--">getState</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#getState-org.eclipse.jetty.util.component.LifeCycle-">getState</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#getStopTimeout--">getStopTimeout</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#isFailed--">isFailed</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#isRunning--">isRunning</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#isStarted--">isStarted</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#isStarting--">isStarting</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#isStopped--">isStopped</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#isStopping--">isStopping</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#removeLifeCycleListener-org.eclipse.jetty.util.component.LifeCycle.Listener-">removeLifeCycleListener</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#setStopTimeout-long-">setStopTimeout</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#start--">start</a>, <a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#stop--">stop</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="LowResourceMonitor-org.eclipse.jetty.server.Server-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LowResourceMonitor</h4>
<pre>public&nbsp;LowResourceMonitor(<a href="../../../../org/eclipse/jetty/util/annotation/Name.html" title="annotation in org.eclipse.jetty.util.annotation">@Name</a>(<a href="../../../../org/eclipse/jetty/util/annotation/Name.html#value--">value</a>="server")
<a href="../../../../org/eclipse/jetty/server/Server.html" title="class in org.eclipse.jetty.server">Server</a>&nbsp;server)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isLowOnResources--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLowOnResources</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="Are the monitored connectors low on resources?")
public&nbsp;boolean&nbsp;isLowOnResources()</pre>
</li>
</ul>
<a name="getLowResourcesReasons--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLowResourcesReasons</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="The reason(s) the monitored connectors are low on resources")
public&nbsp;java.lang.String&nbsp;getLowResourcesReasons()</pre>
</li>
</ul>
<a name="getLowResourcesStarted--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLowResourcesStarted</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="Get the timestamp in ms since epoch that low resources state started")
public&nbsp;long&nbsp;getLowResourcesStarted()</pre>
</li>
</ul>
<a name="getMonitoredConnectors--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMonitoredConnectors</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="The monitored connectors. If null then all server connectors are monitored")
public&nbsp;java.util.Collection&lt;<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>&gt;&nbsp;getMonitoredConnectors()</pre>
</li>
</ul>
<a name="setMonitoredConnectors-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMonitoredConnectors</h4>
<pre>public&nbsp;void&nbsp;setMonitoredConnectors(java.util.Collection&lt;<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>&gt;&nbsp;monitoredConnectors)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>monitoredConnectors</code> - The collections of Connectors that should be monitored for low resources.</dd>
</dl>
</li>
</ul>
<a name="getPeriod--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPeriod</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="The monitor period in ms")
public&nbsp;int&nbsp;getPeriod()</pre>
</li>
</ul>
<a name="setPeriod-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPeriod</h4>
<pre>public&nbsp;void&nbsp;setPeriod(int&nbsp;periodMS)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>periodMS</code> - The period in ms to monitor for low resources</dd>
</dl>
</li>
</ul>
<a name="getMonitorThreads--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMonitorThreads</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="True if low available threads status is monitored")
public&nbsp;boolean&nbsp;getMonitorThreads()</pre>
</li>
</ul>
<a name="setMonitorThreads-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMonitorThreads</h4>
<pre>public&nbsp;void&nbsp;setMonitorThreads(boolean&nbsp;monitorThreads)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>monitorThreads</code> - If true, check connectors executors to see if they are
<a href="../../../../org/eclipse/jetty/util/thread/ThreadPool.html" title="interface in org.eclipse.jetty.util.thread"><code>ThreadPool</code></a> instances that are low on threads.</dd>
</dl>
</li>
</ul>
<a name="getMaxConnections--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxConnections</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="The maximum connections allowed for the monitored connectors before low resource handling is activated")
public&nbsp;int&nbsp;getMaxConnections()</pre>
</li>
</ul>
<a name="setMaxConnections-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxConnections</h4>
<pre>public&nbsp;void&nbsp;setMaxConnections(int&nbsp;maxConnections)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxConnections</code> - The maximum connections before low resources state is triggered</dd>
</dl>
</li>
</ul>
<a name="getMaxMemory--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxMemory</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="The maximum memory (in bytes) that can be used before low resources is triggered. Memory used is calculated as (totalMemory-freeMemory).")
public&nbsp;long&nbsp;getMaxMemory()</pre>
</li>
</ul>
<a name="setMaxMemory-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxMemory</h4>
<pre>public&nbsp;void&nbsp;setMaxMemory(long&nbsp;maxMemoryBytes)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxMemoryBytes</code> - The maximum memory in bytes in use before low resources is triggered.</dd>
</dl>
</li>
</ul>
<a name="getLowResourcesIdleTimeout--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLowResourcesIdleTimeout</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="The idletimeout in ms to apply to all existing connections when low resources is detected")
public&nbsp;int&nbsp;getLowResourcesIdleTimeout()</pre>
</li>
</ul>
<a name="setLowResourcesIdleTimeout-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLowResourcesIdleTimeout</h4>
<pre>public&nbsp;void&nbsp;setLowResourcesIdleTimeout(int&nbsp;lowResourcesIdleTimeoutMS)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lowResourcesIdleTimeoutMS</code> - The timeout in ms to apply to EndPoints when in the low resources state.</dd>
</dl>
</li>
</ul>
<a name="getMaxLowResourcesTime--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxLowResourcesTime</h4>
<pre><a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>(<a href="../../../../org/eclipse/jetty/util/annotation/ManagedAttribute.html#value--">value</a>="The maximum time in ms that low resources condition can persist before lowResourcesIdleTimeout is applied to new connections as well as existing connections")
public&nbsp;int&nbsp;getMaxLowResourcesTime()</pre>
</li>
</ul>
<a name="setMaxLowResourcesTime-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxLowResourcesTime</h4>
<pre>public&nbsp;void&nbsp;setMaxLowResourcesTime(int&nbsp;maxLowResourcesTimeMS)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxLowResourcesTimeMS</code> - The time in milliseconds that a low resource state can persist before the low resource idle timeout is reapplied to all connections</dd>
</dl>
</li>
</ul>
<a name="doStart--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doStart</h4>
<pre>protected&nbsp;void&nbsp;doStart()
throws java.lang.Exception</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#doStart--">doStart</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd>
</dl>
</li>
</ul>
<a name="doStop--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doStop</h4>
<pre>protected&nbsp;void&nbsp;doStop()
throws java.lang.Exception</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#doStop--">doStop</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd>
</dl>
</li>
</ul>
<a name="getMonitoredOrServerConnectors--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMonitoredOrServerConnectors</h4>
<pre>protected&nbsp;<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>[]&nbsp;getMonitoredOrServerConnectors()</pre>
</li>
</ul>
<a name="monitor--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>monitor</h4>
<pre>protected&nbsp;void&nbsp;monitor()</pre>
</li>
</ul>
<a name="setLowResources--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLowResources</h4>
<pre>protected&nbsp;void&nbsp;setLowResources()</pre>
</li>
</ul>
<a name="clearLowResources--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clearLowResources</h4>
<pre>protected&nbsp;void&nbsp;clearLowResources()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LowResourceMonitor.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/eclipse/jetty/server/LocalConnector.LocalEndPoint.html" title="class in org.eclipse.jetty.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/eclipse/jetty/server/MultiPartCleanerListener.html" title="class in org.eclipse.jetty.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/eclipse/jetty/server/LowResourceMonitor.html" target="_top">Frames</a></li>
<li><a href="LowResourceMonitor.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.classes.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1995&#x2013;2018 <a href="http://webtide.com">Webtide</a>. All rights reserved.</small></p>
</body>
</html>