| <!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 (version 1.7.0_80) on Wed Jun 07 15:10:50 EDT 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>LowResourceMonitor (Jetty :: Project 9.2.22.v20170606 API)</title> |
| <meta name="date" content="2017-06-07"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="LowResourceMonitor (Jetty :: Project 9.2.22.v20170606 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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 class="aboutLanguage"><em><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1149868-7']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></em></div> |
| </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="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/eclipse/jetty/server/NCSARequestLog.html" title="class in org.eclipse.jetty.server"><span class="strong">Next 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 Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested_classes_inherited_from_class_org.eclipse.jetty.util.component.AbstractLifeCycle">Nested</a> | </li> |
| <li><a href="#fields_inherited_from_class_org.eclipse.jetty.util.component.AbstractLifeCycle">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </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><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></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="strong">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. |
| 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 |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html?is-external=true" title="class or interface in java.lang"><code>Runtime</code></a> instance has <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html?is-external=true#totalMemory()" title="class or interface in java.lang"><code>Runtime.totalMemory()</code></a> minus <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html?is-external=true#freeMemory()" title="class or interface in java.lang"><code>Runtime.freeMemory()</code></a> |
| 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> |
| <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>. |
| </p></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 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 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 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#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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#LowResourceMonitor(org.eclipse.jetty.server.Server)">LowResourceMonitor</a></strong>(<a href="../../../../org/eclipse/jetty/server/Server.html" title="class in org.eclipse.jetty.server">Server</a> server)</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#clearLowResources()">clearLowResources</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#doStart()">doStart</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#doStop()">doStop</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesIdleTimeout()">getLowResourcesIdleTimeout</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesReasons()">getLowResourcesReasons</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getLowResourcesStarted()">getLowResourcesStarted</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxConnections()">getMaxConnections</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxLowResourcesTime()">getMaxLowResourcesTime</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMaxMemory()">getMaxMemory</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMonitoredConnectors()">getMonitoredConnectors</a></strong>()</code> </td> |
| </tr> |
| <tr 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><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMonitoredOrServerConnectors()">getMonitoredOrServerConnectors</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getMonitorThreads()">getMonitorThreads</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#getPeriod()">getPeriod</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#isLowOnResources()">isLowOnResources</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#monitor()">monitor</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setLowResources()">setLowResources</a></strong>()</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setLowResourcesIdleTimeout(int)">setLowResourcesIdleTimeout</a></strong>(int lowResourcesIdleTimeoutMS)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxConnections(int)">setMaxConnections</a></strong>(int maxConnections)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxLowResourcesTime(int)">setMaxLowResourcesTime</a></strong>(int maxLowResourcesTimeMS)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMaxMemory(long)">setMaxMemory</a></strong>(long maxMemoryBytes)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMonitoredConnectors(java.util.Collection)">setMonitoredConnectors</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>> monitoredConnectors)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setMonitorThreads(boolean)">setMonitorThreads</a></strong>(boolean monitorThreads)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/eclipse/jetty/server/LowResourceMonitor.html#setPeriod(int)">setPeriod</a></strong>(int periodMS)</code> </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 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 java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></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 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> 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 boolean 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 <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 long 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 <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>> getMonitoredConnectors()</pre> |
| </li> |
| </ul> |
| <a name="setMonitoredConnectors(java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMonitoredConnectors</h4> |
| <pre>public void setMonitoredConnectors(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><<a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>> monitoredConnectors)</pre> |
| <dl><dt><span class="strong">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 int getPeriod()</pre> |
| </li> |
| </ul> |
| <a name="setPeriod(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPeriod</h4> |
| <pre>public void setPeriod(int periodMS)</pre> |
| <dl><dt><span class="strong">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 boolean getMonitorThreads()</pre> |
| </li> |
| </ul> |
| <a name="setMonitorThreads(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMonitorThreads</h4> |
| <pre>public void setMonitorThreads(boolean monitorThreads)</pre> |
| <dl><dt><span class="strong">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 int getMaxConnections()</pre> |
| </li> |
| </ul> |
| <a name="setMaxConnections(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMaxConnections</h4> |
| <pre>public void setMaxConnections(int maxConnections)</pre> |
| <dl><dt><span class="strong">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 long getMaxMemory()</pre> |
| </li> |
| </ul> |
| <a name="setMaxMemory(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMaxMemory</h4> |
| <pre>public void setMaxMemory(long maxMemoryBytes)</pre> |
| <dl><dt><span class="strong">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 int getLowResourcesIdleTimeout()</pre> |
| </li> |
| </ul> |
| <a name="setLowResourcesIdleTimeout(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLowResourcesIdleTimeout</h4> |
| <pre>public void setLowResourcesIdleTimeout(int lowResourcesIdleTimeoutMS)</pre> |
| <dl><dt><span class="strong">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 int getMaxLowResourcesTime()</pre> |
| </li> |
| </ul> |
| <a name="setMaxLowResourcesTime(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMaxLowResourcesTime</h4> |
| <pre>public void setMaxLowResourcesTime(int maxLowResourcesTimeMS)</pre> |
| <dl><dt><span class="strong">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 void doStart() |
| throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#doStart()">doStart</a></code> in class <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="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd></dl> |
| </li> |
| </ul> |
| <a name="doStop()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doStop</h4> |
| <pre>protected void doStop() |
| throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="../../../../org/eclipse/jetty/util/component/AbstractLifeCycle.html#doStop()">doStop</a></code> in class <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="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd></dl> |
| </li> |
| </ul> |
| <a name="getMonitoredOrServerConnectors()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMonitoredOrServerConnectors</h4> |
| <pre>protected <a href="../../../../org/eclipse/jetty/server/Connector.html" title="interface in org.eclipse.jetty.server">Connector</a>[] getMonitoredOrServerConnectors()</pre> |
| </li> |
| </ul> |
| <a name="monitor()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>monitor</h4> |
| <pre>protected void monitor()</pre> |
| </li> |
| </ul> |
| <a name="setLowResources()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLowResources</h4> |
| <pre>protected void setLowResources()</pre> |
| </li> |
| </ul> |
| <a name="clearLowResources()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>clearLowResources</h4> |
| <pre>protected void 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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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 class="aboutLanguage"><em><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1149868-7']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script></em></div> |
| </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="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/eclipse/jetty/server/NCSARequestLog.html" title="class in org.eclipse.jetty.server"><span class="strong">Next 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 Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested_classes_inherited_from_class_org.eclipse.jetty.util.component.AbstractLifeCycle">Nested</a> | </li> |
| <li><a href="#fields_inherited_from_class_org.eclipse.jetty.util.component.AbstractLifeCycle">Field</a> | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </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 © 1995-2017 <a href="http://webtide.com">Webtide</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |