Class Counter
java.lang.Object
org.opendaylight.openflowjava.statistics.Counter
Counts statistics.
- Author:
- madamjak
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
return the last read value of counter.long
Gets current value of counter and rewrite CounterLastReadValue by current value.long
getCounterValue
(boolean modifyLastReadValue) Gets current counter value.getStat()
Returns the last and current count for specified statistic.void
Increment current counter value.void
reset()
Sets current counter value and CounterLastReadValue to 0 (zero).
-
Constructor Details
-
Counter
public Counter()Default constructor.
-
-
Method Details
-
incrementCounter
public void incrementCounter()Increment current counter value. -
getCounterLastReadValue
public 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
-
getCounterValue
public long getCounterValue()Gets current value of counter and rewrite CounterLastReadValue by current value.- Returns:
- the current value of counter
-
getCounterValue
public 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
-
reset
public void reset()Sets current counter value and CounterLastReadValue to 0 (zero). -
getStat
Returns the last and current count for specified statistic.
-