Class Counter
java.lang.Object
org.opendaylight.openflowjava.statistics.Counter
Counts statistics.
- Author:
- madamjak
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlongreturn the last read value of counter.longGets current value of counter and rewrite CounterLastReadValue by current value.longgetCounterValue(boolean modifyLastReadValue) Gets current counter value.getStat()Returns the last and current count for specified statistic.voidIncrement current counter value.voidreset()Sets current counter value and CounterLastReadValue to 0 (zero).
- 
Constructor Details- 
Counterpublic Counter()Default constructor.
 
- 
- 
Method Details- 
incrementCounterpublic void incrementCounter()Increment current counter value.
- 
getCounterLastReadValuepublic long getCounterLastReadValue()return the last read value of counter. This value can be set during the reading of current counter value, for detail see method getCounterValue(boolean modifyLastReadValue).- Returns:
- the counterLastReadValue
 
- 
getCounterValuepublic long getCounterValue()Gets current value of counter and rewrite CounterLastReadValue by current value.- Returns:
- the current value of counter
 
- 
getCounterValuepublic long getCounterValue(boolean modifyLastReadValue) Gets current counter value.- Parameters:
- modifyLastReadValue- true - CounterLastReadValue will be rewritten by current CounterValue false - no change CounterLastReadValue
- Returns:
- the current value of counter
 
- 
resetpublic void reset()Sets current counter value and CounterLastReadValue to 0 (zero).
- 
getStatReturns the last and current count for specified statistic.
 
-