@Test public void testHierarchicalCounterReset3() { testCounterHierarchy(); dc.resetAllModuleCounters("switch"); checkCounters(0, 0, 3, 0, 0, 0, 0); dc.resetAllModuleCounters("linkd"); checkCounters(0, 0, 0, 0, 0, 0, 0); testCounterHierarchy(); }
@Override public void resetAllModuleCounters(String moduleName) { Map<String, CounterIndexStore> target = moduleCounters.get(moduleName); RetCtrInfo rci = new RetCtrInfo(); rci.levels = "".split("/"); if (target != null) { ArrayList<Integer> resetIds = getHierarchyBelow(moduleName, rci); for (int index : resetIds) { allCounters[index].cvalue.set(0); } } else { if (log.isDebugEnabled()) log.debug("No module found with name {}", moduleName); } }
DebugCounter implements IFloodlightModule, IDebugCounterService { @Override public void resetAllModuleCounters(String moduleName) { Map<String, CounterIndexStore> target = moduleCounters.get(moduleName); RetCtrInfo rci = new RetCtrInfo(); rci.levels = "".split("/"); if (target != null) { ArrayList<Integer> resetIds = getHierarchyBelow(moduleName, rci); for (int index : resetIds) { allCounters[index].cvalue.set(0); } } else { if (log.isDebugEnabled()) log.debug("No module found with name {}", moduleName); } } }
DebugCounter implements IFloodlightModule, IDebugCounterService { @Override public void resetAllModuleCounters(String moduleName) { Map<String, CounterIndexStore> target = moduleCounters.get(moduleName); RetCtrInfo rci = new RetCtrInfo(); rci.levels = "".split("/"); if (target != null) { ArrayList<Integer> resetIds = getHierarchyBelow(moduleName, rci); for (int index : resetIds) { allCounters[index].cvalue.set(0); } } else { if (log.isDebugEnabled()) log.debug("No module found with name {}", moduleName); } }  }
DebugCounter implements IFloodlightModule, IDebugCounterService { @Override public void resetAllModuleCounters(String moduleName) { Map<String, CounterIndexStore> target = moduleCounters.get(moduleName); RetCtrInfo rci = new RetCtrInfo(); rci.levels = "".split("/"); if (target != null) { ArrayList<Integer> resetIds = getHierarchyBelow(moduleName, rci); for (int index : resetIds) { allCounters[index].cvalue.set(0); } } else { if (log.isDebugEnabled()) log.debug("No module found with name {}", moduleName); } }  @Override IDebugCounter registerCounter(String moduleName, String counterHierarchy,
                           String counterDescription, CounterType counterType,
                           String... metaData); @Override void flushCounters(); @Override void resetCounterHierarchy(String moduleName, String counterHierarchy); @Override void resetAllCounters(); @Override void resetAllModuleCounters(String moduleName); @Override void enableCtrOnDemand(String moduleName, String counterHierarchy); @Override void disableCtrOnDemand(String moduleName, String counterHierarchy); @Override List<DebugCounterInfo> getCounterHierarchy(String moduleName,
                                                     String counterHierarchy); @Override List<DebugCounterInfo> getAllCounterValues(); @Override List<DebugCounterInfo> getModuleCounterValues(String moduleName); @Override boolean containsModuleCounterHierarchy(String moduleName,
                                                 String counterHierarchy); @Override boolean containsModuleName(String moduleName); @Override List<String> getModuleList(); @Override List<String> getModuleCounterList(String moduleName); @Override Collection<Class<? extends IFloodlightService>> getModuleServices(); @Override Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls(); @Override Collection<Class<? extends IFloodlightService>> getModuleDependencies(); @Override void init(FloodlightModuleContext context); @Override void startUp(FloodlightModuleContext context); }
DebugCounter implements IFloodlightModule, IDebugCounterService { @Override public void resetAllModuleCounters(String moduleName) { Map<String, CounterIndexStore> target = moduleCounters.get(moduleName); RetCtrInfo rci = new RetCtrInfo(); rci.levels = "".split("/"); if (target != null) { ArrayList<Integer> resetIds = getHierarchyBelow(moduleName, rci); for (int index : resetIds) { allCounters[index].cvalue.set(0); } } else { if (log.isDebugEnabled()) log.debug("No module found with name {}", moduleName); } }  @Override IDebugCounter registerCounter(String moduleName, String counterHierarchy,
                           String counterDescription, CounterType counterType,
                           String... metaData); @Override void flushCounters(); @Override void resetCounterHierarchy(String moduleName, String counterHierarchy); @Override void resetAllCounters(); @Override void resetAllModuleCounters(String moduleName); @Override void enableCtrOnDemand(String moduleName, String counterHierarchy); @Override void disableCtrOnDemand(String moduleName, String counterHierarchy); @Override List<DebugCounterInfo> getCounterHierarchy(String moduleName,
                                                     String counterHierarchy); @Override List<DebugCounterInfo> getAllCounterValues(); @Override List<DebugCounterInfo> getModuleCounterValues(String moduleName); @Override boolean containsModuleCounterHierarchy(String moduleName,
                                                 String counterHierarchy); @Override boolean containsModuleName(String moduleName); @Override List<String> getModuleList(); @Override List<String> getModuleCounterList(String moduleName); @Override Collection<Class<? extends IFloodlightService>> getModuleServices(); @Override Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls(); @Override Collection<Class<? extends IFloodlightService>> getModuleDependencies(); @Override void init(FloodlightModuleContext context); @Override void startUp(FloodlightModuleContext context);  }