|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.watch.Watch
org.rioproject.watch.ThresholdWatch
org.rioproject.watch.PeriodicWatch
public abstract class PeriodicWatch
A PeriodicWatch provides a mechanism to obtain information at preset intervals of time.
| Field Summary | |
|---|---|
static long |
DEFAULT_PERIOD
Holds value of property period. |
| Fields inherited from class org.rioproject.watch.Watch |
|---|
COMPONENT, DEFAULT_VIEW, id, localRef, logger, watchDataSource |
| Constructor Summary | |
|---|---|
PeriodicWatch(String id)
Creates new Periodic Watch |
|
PeriodicWatch(String id,
Configuration config)
Creates new PeriodicWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided |
|
PeriodicWatch(WatchDataSource watchDataSource,
String id)
Creates new PeriodicWatch |
|
| Method Summary | |
|---|---|
long |
getPeriod()
Getter for property period. |
void |
setPeriod(long newPeriod)
Setter for property period. |
void |
start()
Start the PeriodicWatch. |
void |
stop()
Stop the PeriodicWatch |
| Methods inherited from class org.rioproject.watch.ThresholdWatch |
|---|
addThresholdListener, addWatchRecord, getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, getThresholdManager, getThresholdValues, removeThresholdListener, setCurrentHighThreshold, setCurrentLowThreshold, setThresholdValues |
| Methods inherited from class org.rioproject.watch.Watch |
|---|
clear, equals, getCalculables, getId, getLastCalculableValue, getView, getWatchDataSource, hashCode, main, setView, setWatchDataSource, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.rioproject.watch.PeriodicWatchMBean |
|---|
checkValue |
| Methods inherited from interface org.rioproject.watch.ThresholdWatchMBean |
|---|
getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, setCurrentHighThreshold, setCurrentLowThreshold |
| Methods inherited from interface org.rioproject.watch.WatchMBean |
|---|
clear, getCalculables, getId, getLastCalculableValue |
| Field Detail |
|---|
public static final long DEFAULT_PERIOD
| Constructor Detail |
|---|
public PeriodicWatch(String id)
id - the identifier for this watch
public PeriodicWatch(String id,
Configuration config)
id - The identifier for this watchconfig - Configuration object used for constructing a
WatchDataSource
public PeriodicWatch(WatchDataSource watchDataSource,
String id)
watchDataSource - the watch data source associated with this watchid - the identifier for this watch| Method Detail |
|---|
public void start()
PeriodicWatchMBeancheckValue occurring at the time this method is invoked
plus the time specified for the property value In
fixed-delay execution, each execution is scheduled relative to the actual
execution time of the previous execution. If an execution is delayed for
any reason (such as garbage collection or other background activity),
subsequent executions will be delayed as well. A new Timer will be
created each time this method is called. If a Timer already exists, it
will be cancelled.
start in interface PeriodicWatchMBeanPeriodicWatchMBean.start()public void stop()
PeriodicWatchMBean
stop in interface PeriodicWatchMBeanPeriodicWatchMBean.stop()public long getPeriod()
PeriodicWatchMBean
getPeriod in interface PeriodicWatchMBeanPeriodicWatchMBean.getPeriod()public void setPeriod(long newPeriod)
PeriodicWatchMBean
setPeriod in interface PeriodicWatchMBeannewPeriod - New value of property period. The result of invoking this
method will be to stop the PeriodicWatch and reschedule the subsequent
fixed-delay execution based on the value provided for periodPeriodicWatchMBean.setPeriod(long)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||