blob: dbde1854e9c6f7707e983eedf5bfe6fef299d7ec [file] [log] [blame]
Brian O'Connorc67f9fa2014-08-07 18:17:46 -07001package net.floodlightcontroller.debugcounter;
2
3public interface IDebugCounter {
4 /**
5 * Increments the counter by 1 thread-locally, and immediately flushes to
6 * the global counter storage. This method should be used for counters that
7 * are updated outside the OF message processing pipeline.
8 */
9 void updateCounterWithFlush();
10
11 /**
12 * Increments the counter by 1 thread-locally. Flushing to the global
13 * counter storage is delayed (happens with flushCounters() in IDebugCounterService),
14 * resulting in higher performance. This method should be used for counters
15 * updated in the OF message processing pipeline.
16 */
17 void updateCounterNoFlush();
18
19 /**
20 * Increments the counter thread-locally by the 'incr' specified, and immediately
21 * flushes to the global counter storage. This method should be used for counters
22 * that are updated outside the OF message processing pipeline.
23 */
24 void updateCounterWithFlush(int incr);
25
26 /**
27 * Increments the counter thread-locally by the 'incr' specified. Flushing to the global
28 * counter storage is delayed (happens with flushCounters() in IDebugCounterService),
29 * resulting in higher performance. This method should be used for counters
30 * updated in the OF message processing pipeline.
31 */
32 void updateCounterNoFlush(int incr);
33
34 /**
35 * Retrieve the value of the counter from the global counter store
36 */
37 long getCounterValue();
38}