public interface Monitor
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.Modifier and Type | Method and Description |
---|---|
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.
|
void start()
void restart()
void stop()
void setInterval(int interval)
interval
- Refreshing interval time.int getInterval()
void setDuration(int duration)
duration
- The specified duration time.int getDuration()
void update()
boolean isStarted()