net.floodlightcontroller.debugcounter
Class DebugCounter.CounterImpl

java.lang.Object
  extended by net.floodlightcontroller.debugcounter.DebugCounter.CounterImpl
All Implemented Interfaces:
IDebugCounter
Enclosing class:
DebugCounter

protected class DebugCounter.CounterImpl
extends java.lang.Object
implements IDebugCounter


Constructor Summary
DebugCounter.CounterImpl(int counterId)
           
 
Method Summary
 long getCounterValue()
          Retrieve the value of the counter from the global counter store
 void updateCounterNoFlush()
          Increments the counter by 1 thread-locally.
 void updateCounterNoFlush(int incr)
          Increments the counter thread-locally by the 'incr' specified.
 void updateCounterWithFlush()
          Increments the counter by 1 thread-locally, and immediately flushes to the global counter storage.
 void updateCounterWithFlush(int incr)
          Increments the counter thread-locally by the 'incr' specified, and immediately flushes to the global counter storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugCounter.CounterImpl

public DebugCounter.CounterImpl(int counterId)
Method Detail

updateCounterWithFlush

public void updateCounterWithFlush()
Description copied from interface: IDebugCounter
Increments the counter by 1 thread-locally, and immediately flushes to the global counter storage. This method should be used for counters that are updated outside the OF message processing pipeline.

Specified by:
updateCounterWithFlush in interface IDebugCounter

updateCounterNoFlush

public void updateCounterNoFlush()
Description copied from interface: IDebugCounter
Increments the counter by 1 thread-locally. Flushing to the global counter storage is delayed (happens with flushCounters() in IDebugCounterService), resulting in higher performance. This method should be used for counters updated in the OF message processing pipeline.

Specified by:
updateCounterNoFlush in interface IDebugCounter

updateCounterWithFlush

public void updateCounterWithFlush(int incr)
Description copied from interface: IDebugCounter
Increments the counter thread-locally by the 'incr' specified, and immediately flushes to the global counter storage. This method should be used for counters that are updated outside the OF message processing pipeline.

Specified by:
updateCounterWithFlush in interface IDebugCounter

updateCounterNoFlush

public void updateCounterNoFlush(int incr)
Description copied from interface: IDebugCounter
Increments the counter thread-locally by the 'incr' specified. Flushing to the global counter storage is delayed (happens with flushCounters() in IDebugCounterService), resulting in higher performance. This method should be used for counters updated in the OF message processing pipeline.

Specified by:
updateCounterNoFlush in interface IDebugCounter

getCounterValue

public long getCounterValue()
Description copied from interface: IDebugCounter
Retrieve the value of the counter from the global counter store

Specified by:
getCounterValue in interface IDebugCounter