blob: 1775c50b8fd415e4e7808d9f2e5606e56cec39c0 [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package net.onrc.onos.of.ctl.debugcounter;
2
3import java.util.Collections;
4import java.util.List;
5
6import net.onrc.onos.of.ctl.debugcounter.DebugCounter.DebugCounterInfo;
7
8public class NullDebugCounter implements IDebugCounterService {
9
10 @Override
11 public void flushCounters() {
12
13 }
14
15 @Override
16 public void resetAllCounters() {
17
18 }
19
20 @Override
21 public void resetAllModuleCounters(String moduleName) {
22
23 }
24
25
26 @Override
27 public void resetCounterHierarchy(String moduleName, String counterHierarchy) {
28
29 }
30
31 @Override
32 public void enableCtrOnDemand(String moduleName, String counterHierarchy) {
33
34 }
35
36 @Override
37 public void disableCtrOnDemand(String moduleName, String counterHierarchy) {
38
39 }
40
41 @Override
42 public List<DebugCounterInfo> getCounterHierarchy(String moduleName,
43 String counterHierarchy) {
44 return Collections.emptyList();
45 }
46
47 @Override
48 public List<DebugCounterInfo> getAllCounterValues() {
49 return Collections.emptyList();
50 }
51
52 @Override
53 public List<DebugCounterInfo> getModuleCounterValues(String moduleName) {
54 return Collections.emptyList();
55 }
56
57 @Override
58 public boolean containsModuleCounterHierarchy(String moduleName,
59 String counterHierarchy) {
60 return false;
61 }
62
63 @Override
64 public boolean containsModuleName(String moduleName) {
65 return false;
66 }
67
68 @Override
69 public
70 IDebugCounter
71 registerCounter(String moduleName, String counterHierarchy,
72 String counterDescription,
73 CounterType counterType, String... metaData)
74 throws MaxCountersRegistered {
75 return new NullCounterImpl();
76 }
77
78 @Override
79 public List<String> getModuleList() {
80 return Collections.emptyList();
81 }
82
83 @Override
84 public List<String> getModuleCounterList(String moduleName) {
85 return Collections.emptyList();
86 }
87
88 public static class NullCounterImpl implements IDebugCounter {
89
90 @Override
91 public void updateCounterWithFlush() {
92
93 }
94
95 @Override
96 public void updateCounterNoFlush() {
97
98 }
99
100 @Override
101 public void updateCounterWithFlush(int incr) {
102 }
103
104 @Override
105 public void updateCounterNoFlush(int incr) {
106
107 }
108
109 @Override
110 public long getCounterValue() {
111 return -1;
112 }
113
114 }
115
116}