blob: 2dc0c0af2a5a15cb25c77d3ba175fb56547b9945 [file] [log] [blame]
tom9ccd7812014-08-25 22:43:19 -07001package org.onlab.onos.of.controller.impl.debugcounter;
tom0eb04ca2014-08-25 14:34:51 -07002
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}