| |
|
| java.lang.Object org.directwebremoting.impl.AbstractServerLoadMonitor org.directwebremoting.impl.ThreadDroppingServerLoadMonitor
ThreadDroppingServerLoadMonitor | public class ThreadDroppingServerLoadMonitor extends AbstractServerLoadMonitor implements ServerLoadMonitor(Code) | | A smart implementation of ServerLoadMonitor, customized for Jetty.
The ThreadDroppingServerLoadMonitor attempts to keep the hit rate down by increasing
the disconnected time as usage increases.
author: Joe Walker [joe at getahead dot org] |
Field Summary | |
final protected static int | SECONDS_MONITORED We are recording the number of hits in the last 5 seconds. | protected int | connectedTime The time we are currently waiting before sending a browser away and
asking it to reconnect. | protected int | disconnectedTime | protected HitMonitor | hitMonitor | protected int | maxHitsPerSecond Static configuration data: The max number of hits per second.
We increase the poll time to compensate and reduce the load. |
SECONDS_MONITORED | final protected static int SECONDS_MONITORED(Code) | | We are recording the number of hits in the last 5 seconds.
Maybe we should think about making this configurable.
|
connectedTime | protected int connectedTime(Code) | | The time we are currently waiting before sending a browser away and
asking it to reconnect.
|
disconnectedTime | protected int disconnectedTime(Code) | | How long are we telling users to wait before they come back next
|
hitMonitor | protected HitMonitor hitMonitor(Code) | | Our record of the server loading
|
maxHitsPerSecond | protected int maxHitsPerSecond(Code) | | Static configuration data: The max number of hits per second.
We increase the poll time to compensate and reduce the load. If this
number is not at least half maxWaitingThreads then the USAGE_HIGH mode
will not exist and the system will sublime from USAGE_LOW to USAGE_DIGG
|
getConnectedTime | public long getConnectedTime()(Code) | | |
getDisconnectedTime | public int getDisconnectedTime()(Code) | | |
setMaxHitsPerSecond | public void setMaxHitsPerSecond(int maxHitsPerSecond)(Code) | | Parameters: maxHitsPerSecond - the maxHitsPerSecond to set |
supportsStreaming | public boolean supportsStreaming()(Code) | | |
|
|
|