|
||||||||||
| 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.CounterWatch
public class CounterWatch
A CounterWatch provides a mechanism to count a monotonically increasing non-negative value of an arbitrary occurance of something over time
| Field Summary | |
|---|---|
static String |
VIEW
|
| Fields inherited from class org.rioproject.watch.Watch |
|---|
COMPONENT, DEFAULT_VIEW, id, localRef, logger, watchDataSource |
| Constructor Summary | |
|---|---|
CounterWatch(String id)
Create a new Counter Watch |
|
CounterWatch(String id,
Configuration config)
Creates new CounterWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided |
|
CounterWatch(WatchDataSource watchDataSource,
String id)
Create a new Counter Watch |
|
| Method Summary | |
|---|---|
void |
decrement()
Decrement the count by one |
void |
decrement(long value)
Decrement the count |
long |
getCounter()
Getter for property counter |
void |
increment()
Increment the count by one |
void |
increment(long value)
Increment the count |
static void |
main(String[] args)
|
void |
setCounter(long counter)
Setter for property counter |
| 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, 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 CounterWatch(String id)
id - the identifier for this watch
public CounterWatch(String id,
Configuration config)
id - The identifier for this watchconfig - Configuration object used for constructing a
WatchDataSource
public CounterWatch(WatchDataSource watchDataSource,
String id)
watchDataSource - the watch data source associated with this watchid - the identifier for this watch| Method Detail |
|---|
public long getCounter()
CounterWatchMBean
getCounter in interface CounterWatchMBeanCounterWatchMBean.getCounter()public void setCounter(long counter)
CounterWatchMBean
setCounter in interface CounterWatchMBeancounter - New value of property counter.CounterWatchMBean.setCounter(long)public void increment()
CounterWatchMBean
increment in interface CounterWatchMBeanCounterWatchMBean.increment()public void increment(long value)
CounterWatchMBean
increment in interface CounterWatchMBeanvalue - the amount to increment the counterCounterWatchMBean.increment(long)public void decrement()
CounterWatchMBean
decrement in interface CounterWatchMBeanCounterWatchMBean.decrement()public void decrement(long value)
CounterWatchMBean
decrement in interface CounterWatchMBeanvalue - the amount to decrement the counterCounterWatchMBean.decrement(long)public static void main(String[] args)
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||