blob: e157cf22d9914b0cef4bcfb91d8b722b20d415ce [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package net.onrc.onos.of.ctl.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}