Rio Project 4.2 API Documentation



org.rioproject.watch
Interface PeriodicWatchMBean

All Superinterfaces:
ThresholdWatchMBean, WatchMBean
All Known Subinterfaces:
DiskSpaceMBean, MeasurableCapabilityMBean
All Known Implementing Classes:
CPU, DiskSpace, MeasurableCapability, Memory, MemoryPool, PeriodicWatch, SamplingWatch, SystemMemory

public interface PeriodicWatchMBean
extends ThresholdWatchMBean

Provides a standard MBean to use when administering a PeriodicWatch using JMX


Method Summary
 void checkValue()
          Abstract method to check the watch's value at the periodic interval
 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 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
 

Method Detail

start

void start()
Start the PeriodicWatch. The PeriodicWatch will be started using repeated fixed-delay executions, with the first invocation of checkValue 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.

See Also:
Timer.schedule(java.util.TimerTask, java.util.Date, long)

stop

void stop()
Stop the PeriodicWatch


getPeriod

long getPeriod()
Getter for property period.

Returns:
Value of property period.

setPeriod

void setPeriod(long newPeriod)
Setter for property period.

Parameters:
newPeriod - 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 period

checkValue

void checkValue()
Abstract method to check the watch's value at the periodic interval


Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.