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