java.lang.Object
org.opendaylight.openflowjava.statistics.Counter

public class Counter extends Object
Counts statistics.
Author:
madamjak
  • Constructor Details Link icon

    • Counter Link icon

      public Counter()
      Default constructor.
  • Method Details Link icon

    • incrementCounter Link icon

      public void incrementCounter()
      Increment current counter value.
    • getCounterLastReadValue Link icon

      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 Link icon

      public long getCounterValue()
      Gets current value of counter and rewrite CounterLastReadValue by current value.
      Returns:
      the current value of counter
    • getCounterValue Link icon

      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 Link icon

      public void reset()
      Sets current counter value and CounterLastReadValue to 0 (zero).
    • getStat Link icon

      public String getStat()
      Returns the last and current count for specified statistic.