|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.floodlightcontroller.debugcounter.NullDebugCounter
public class NullDebugCounter
Nested Class Summary | |
---|---|
class |
NullDebugCounter.NullCounterImpl
|
Nested classes/interfaces inherited from interface net.floodlightcontroller.debugcounter.IDebugCounterService |
---|
IDebugCounterService.CounterException, IDebugCounterService.CounterType, IDebugCounterService.MaxCountersRegistered, IDebugCounterService.MaxHierarchyRegistered, IDebugCounterService.MissingHierarchicalLevel |
Field Summary |
---|
Fields inherited from interface net.floodlightcontroller.debugcounter.IDebugCounterService |
---|
CTR_MDATA_ERROR, CTR_MDATA_WARN, MAX_COUNTERS, MAX_HIERARCHY |
Constructor Summary | |
---|---|
NullDebugCounter()
|
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.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleDependencies()
Get a list of Modules that this module depends on. |
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 |
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleServices()
Return the list of interfaces that this module implements. |
java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> |
getServiceImpls()
Instantiate (as needed) and return objects that implement each of the services exported by this module. |
void |
init(FloodlightModuleContext context)
This is a hook for each module to do its internal initialization, e.g., call setService(context.getService("Service")) All module dependencies are resolved when this is called, but not every module is initialized. |
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. |
void |
startUp(FloodlightModuleContext context)
This is a hook for each module to do its external initializations, e.g., register for callbacks or query for state in other modules It is expected that this function will not block and that modules that want non-event driven CPU will spawn their own threads. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NullDebugCounter()
Method Detail |
---|
public java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleServices()
IFloodlightModule
getModuleServices
in interface IFloodlightModule
public java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> getServiceImpls()
IFloodlightModule
getServiceImpls
in interface IFloodlightModule
public java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleDependencies()
IFloodlightModule
getModuleDependencies
in interface IFloodlightModule
public void init(FloodlightModuleContext context) throws FloodlightModuleException
IFloodlightModule
init
in interface IFloodlightModule
FloodlightModuleException
public void startUp(FloodlightModuleContext context)
IFloodlightModule
startUp
in interface IFloodlightModule
public void flushCounters()
IDebugCounterService
flushCounters
in interface IDebugCounterService
public void resetAllCounters()
IDebugCounterService
resetAllCounters
in interface IDebugCounterService
public void resetAllModuleCounters(java.lang.String moduleName)
IDebugCounterService
resetAllModuleCounters
in interface IDebugCounterService
public void resetCounterHierarchy(java.lang.String moduleName, java.lang.String counterHierarchy)
IDebugCounterService
resetCounterHierarchy
in interface IDebugCounterService
public void enableCtrOnDemand(java.lang.String moduleName, java.lang.String counterHierarchy)
IDebugCounterService
enableCtrOnDemand
in interface IDebugCounterService
public void disableCtrOnDemand(java.lang.String moduleName, java.lang.String counterHierarchy)
IDebugCounterService
disableCtrOnDemand
in interface IDebugCounterService
public java.util.List<DebugCounter.DebugCounterInfo> getCounterHierarchy(java.lang.String moduleName, java.lang.String counterHierarchy)
IDebugCounterService
getCounterHierarchy
in interface IDebugCounterService
public java.util.List<DebugCounter.DebugCounterInfo> getAllCounterValues()
IDebugCounterService
getAllCounterValues
in interface IDebugCounterService
public java.util.List<DebugCounter.DebugCounterInfo> getModuleCounterValues(java.lang.String moduleName)
IDebugCounterService
getModuleCounterValues
in interface IDebugCounterService
public boolean containsModuleCounterHierarchy(java.lang.String moduleName, java.lang.String counterHierarchy)
IDebugCounterService
containsModuleCounterHierarchy
in interface IDebugCounterService
public boolean containsModuleName(java.lang.String moduleName)
IDebugCounterService
containsModuleName
in interface IDebugCounterService
public 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
registerCounter
in interface IDebugCounterService
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
public java.util.List<java.lang.String> getModuleList()
IDebugCounterService
getModuleList
in interface IDebugCounterService
public java.util.List<java.lang.String> getModuleCounterList(java.lang.String moduleName)
IDebugCounterService
getModuleCounterList
in interface IDebugCounterService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |