Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.util
Class HitMonitor

    java.lang.Object
      org.directwebremoting.util.HitMonitor

    public class HitMonitor

extends java.lang.Object

We need a way to record how heavily used the server is, and adjust our behavior to reduce the load on the server.

Author:
  Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
`HitMonitor(int seconds)` Create a HitMonitor that records the number of hits in the last n milliseconds.

Method Summary
`int` | `getHitsInLastPeriod()` How to detect the number of hits in the time period specified in the constructor.
`void` | `recordHit()` A hit has happened, record some load on the server

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HitMonitor

    public HitMonitor(int seconds)

  Create a HitMonitor that records the number of hits in the last n milliseconds.

  Parameters:
    `seconds` - The number of seconds to record hits for

Method Detail

### recordHit

    public void recordHit()

  A hit has happened, record some load on the server

### getHitsInLastPeriod

    public int getHitsInLastPeriod()

  How to detect the number of hits in the time period specified in the constructor.

  Returns:
    The hit count

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD