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

## jet.server.monitor.api
Interface Monitor

All Known Subinterfaces:
  AdhocMonitor, DatabaseMonitor, TaskMonitor, UserMonitor

    public interface Monitor

This `Monitor` is the parent of all other specific monitors. It defines the common parts of all monitors. All the monitoring objects are monitored at intervals specified by the granularity period.

Method Summary
`int` | `getDuration()` Gets currently monitoring duration time (in milliseconds).
`int` | `getInterval()` Gets currently refreshing interval time (in milliseconds).
`boolean` | `isStarted()` Judges whether or not the current monitor has been started.
`void` | `restart()` Restarts the monitor.
`void` | `setDuration(int duration)` Sets monitoring duration (in milliseconds) till up to now.
`void` | `setInterval(int interval)` Sets refreshing interval time (in milliseconds).
`void` | `start()` Starts up the monitor.
`void` | `stop()` Stops and exits the monitor.
`void` | `update()` Updates monitoring temporary storage contents according to the specified duration time.

Method Detail

### start

    void start()

  Starts up the monitor.

### restart

    void restart()

  Restarts the monitor.

### stop

    void stop()

  Stops and exits the monitor.

### setInterval

    void setInterval(int interval)

  Sets refreshing interval time (in milliseconds).

  Parameters:
    `interval` - Refreshing interval time.

### getInterval

    int getInterval()

  Gets currently refreshing interval time (in milliseconds).

  Returns:
    Refreshing interval time.

### setDuration

    void setDuration(int duration)

  Sets monitoring duration (in milliseconds) till up to now. All monitored contents are updated in the specified duration. If this value is set to 0 or negative integer, it means to monitor the whole duration's contents from the time when the monitor was started to now.

  Parameters:
    `duration` - The specified duration time.

### getDuration

    int getDuration()

  Gets currently monitoring duration time (in milliseconds).

  Returns:
    monitoring duration time.

### update

    void update()

  Updates monitoring temporary storage contents according to the specified duration time. This method should be invoked whenever the monitoring interval time is reached.

### isStarted

    boolean isStarted()

  Judges whether or not the current monitor has been started.

  Returns:
    true if this monitor has been started, or else return false.

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