|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDebugCounterService
Nested Class Summary | |
---|---|
static class |
IDebugCounterService.CounterException
|
static class |
IDebugCounterService.CounterType
Different counter types. |
static class |
IDebugCounterService.MaxCountersRegistered
Exception thrown when MAX_COUNTERS have been registered |
static class |
IDebugCounterService.MaxHierarchyRegistered
Exception thrown when MAX_HIERARCHY has been reached |
static class |
IDebugCounterService.MissingHierarchicalLevel
Exception thrown when attempting to register a hierarchical counter where higher levels of the hierarchy have not been pre-registered |
Field Summary | |
---|---|
static java.lang.String |
CTR_MDATA_ERROR
|
static java.lang.String |
CTR_MDATA_WARN
Debug Counter Qualifiers |
static int |
MAX_COUNTERS
A limit on the maximum number of counters that can be created |
static int |
MAX_HIERARCHY
maximum levels of hierarchy Example of moduleName/counterHierarchy: switch/00:00:00:00:01:02:03:04/pktin/drops where moduleName ==> "switch" and counterHierarchy of 3 ==> "00:00:00:00:01:02:03:04/pktin/drops" |
Method Summary | |
---|---|
boolean |
containsModuleCounterHierarchy(java.lang.String moduleName,
java.lang.String counterHierarchy)
Convenience method to figure out if the the given 'counterHierarchy' corresponds to a registered counterHierarchy for 'moduleName'. |
boolean |
containsModuleName(java.lang.String moduleName)
Convenience method to figure out if the the given 'moduleName' corresponds to a registered moduleName or not. |
void |
disableCtrOnDemand(java.lang.String moduleName,
java.lang.String counterHierarchy)
This method applies only to CounterType.COUNT_ON_DEMAND. |
void |
enableCtrOnDemand(java.lang.String moduleName,
java.lang.String counterHierarchy)
This method applies only to CounterType.COUNT_ON_DEMAND. |
void |
flushCounters()
Flush all thread-local counter values (from the current thread) to the global counter store. |
java.util.List<DebugCounter.DebugCounterInfo> |
getAllCounterValues()
Get counter values and associated information for all counters in the system |
java.util.List<DebugCounter.DebugCounterInfo> |
getCounterHierarchy(java.lang.String moduleName,
java.lang.String counterHierarchy)
Get counter value and associated information for the specified counterHierarchy. |
java.util.List<java.lang.String> |
getModuleCounterList(java.lang.String moduleName)
Returns a list of all counters registered for a specific moduleName or a empty list |
java.util.List<DebugCounter.DebugCounterInfo> |
getModuleCounterValues(java.lang.String moduleName)
Get counter values and associated information for all counters associated with a module. |
java.util.List<java.lang.String> |
getModuleList()
Returns a list of moduleNames registered for debug counters or an empty list if no counters have been registered in the system |
IDebugCounter |
registerCounter(java.lang.String moduleName,
java.lang.String counterHierarchy,
java.lang.String counterDescription,
IDebugCounterService.CounterType counterType,
java.lang.String... metaData)
All modules that wish to have the DebugCounterService count for them, must register their counters by making this call (typically from that module's 'startUp' method). |
void |
resetAllCounters()
Resets the values of all counters in the system. |
void |
resetAllModuleCounters(java.lang.String moduleName)
Resets the values of all counters belonging to a module with the given 'moduleName'. |
void |
resetCounterHierarchy(java.lang.String moduleName,
java.lang.String counterHierarchy)
Resets the value of counters in the hierarchy to zero. |
Field Detail |
---|
static final java.lang.String CTR_MDATA_WARN
static final java.lang.String CTR_MDATA_ERROR
static final int MAX_COUNTERS
static final int MAX_HIERARCHY
Method Detail |
---|
IDebugCounter registerCounter(java.lang.String moduleName, java.lang.String counterHierarchy, java.lang.String counterDescription, IDebugCounterService.CounterType counterType, java.lang.String... metaData) throws IDebugCounterService.MaxCountersRegistered, IDebugCounterService.MaxHierarchyRegistered, IDebugCounterService.MissingHierarchicalLevel
moduleName
- the name of the module which is registering the
counter eg. linkdiscovery or controller or switchcounterHierarchy
- the hierarchical counter name specifying all
the hierarchical levels that come above it.
For example: to register a drop counter for
packet-ins from a switch, the counterHierarchy
can be "00:00:00:00:01:02:03:04/pktin/drops"
It is necessary that counters in hierarchical levels
above have already been pre-registered - in this
example: "00:00:00:00:01:02:03:04/pktin" and
"00:00:00:00:01:02:03:04"counterDescription
- a descriptive string that gives more information
of what the counter is measuring. For example,
"Measures the number of incoming packets seen by
this module".counterType
- One of CounterType. On-demand counter types
need to be explicitly enabled/disabled using other
methods in this API -- i.e. registering them is
not enough to start counting.metaData
- variable arguments that qualify a counter
eg. warn, error etc.
IDebugCounterService.MaxCountersRegistered
IDebugCounterService.MaxHierarchyRegistered
IDebugCounterService.MissingHierarchicalLevel
void flushCounters()
void resetCounterHierarchy(java.lang.String moduleName, java.lang.String counterHierarchy)
void resetAllCounters()
void resetAllModuleCounters(java.lang.String moduleName)
void enableCtrOnDemand(java.lang.String moduleName, java.lang.String counterHierarchy)
void disableCtrOnDemand(java.lang.String moduleName, java.lang.String counterHierarchy)
java.util.List<DebugCounter.DebugCounterInfo> getCounterHierarchy(java.lang.String moduleName, java.lang.String counterHierarchy)
java.util.List<DebugCounter.DebugCounterInfo> getAllCounterValues()
java.util.List<DebugCounter.DebugCounterInfo> getModuleCounterValues(java.lang.String moduleName)
moduleName
-
boolean containsModuleCounterHierarchy(java.lang.String moduleName, java.lang.String counterHierarchy)
param
-
boolean containsModuleName(java.lang.String moduleName)
param
-
java.util.List<java.lang.String> getModuleList()
java.util.List<java.lang.String> getModuleCounterList(java.lang.String moduleName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |