|
||||||||||
| 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.StopWatch
public class StopWatch
A Watch for capturing elapsed time
| Field Summary | |
|---|---|
static String |
VIEW
|
| Fields inherited from class org.rioproject.watch.Watch |
|---|
COMPONENT, DEFAULT_VIEW, id, localRef, logger, watchDataSource |
| Constructor Summary | |
|---|---|
StopWatch(String id)
Creates new Stop Watch |
|
StopWatch(String id,
Configuration config)
Creates new StopWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided |
|
StopWatch(WatchDataSource watchDataSource,
String id)
Creates new Stop Watch |
|
| Method Summary | |
|---|---|
long |
getStartTime()
Getter for property startTime |
void |
setElapsedTime(long elapsed)
Sets the elapsed time of the measured interval |
void |
setElapsedTime(long elapsed,
long now)
Sets the elapsed time of the measured interval |
void |
setStartTime(long startTime)
Setter for property startTime |
void |
startTiming()
Start the timing for the watch |
void |
stopTiming()
Stop the timing for the watch |
| 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.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 String VIEW
| Constructor Detail |
|---|
public StopWatch(String id)
id - the identifier for this watch
public StopWatch(String id,
Configuration config)
id - The identifier for this watchconfig - Configuration object used for constructing a WatchDataSource
public StopWatch(WatchDataSource watchDataSource,
String id)
watchDataSource - the watch data source associated with this watchid - the identifier for this watch| Method Detail |
|---|
public void startTiming()
StopWatchMBean
startTiming in interface StopWatchMBeanStopWatchMBean.startTiming()public void stopTiming()
StopWatchMBean
stopTiming in interface StopWatchMBeanStopWatchMBean.stopTiming()public void setElapsedTime(long elapsed)
StopWatchMBean
setElapsedTime in interface StopWatchMBeanelapsed - milliseconds of elapsed timeStopWatchMBean.setElapsedTime(long)
public void setElapsedTime(long elapsed,
long now)
StopWatchMBean
setElapsedTime in interface StopWatchMBeanelapsed - milliseconds of elapsed timenow - the current time in milliseconcds since the epoch.StopWatchMBean.setElapsedTime(long, long)public long getStartTime()
StopWatchMBean
getStartTime in interface StopWatchMBeanStopWatchMBean.getStartTime()public void setStartTime(long startTime)
StopWatchMBean
setStartTime in interface StopWatchMBeanstartTime - New value of property startTime.StopWatchMBean.setStartTime(long)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||