/** * Initialize internal data structures */ public void init(Map<String, String> configParams) throws FloodlightModuleException { this.moduleLoaderState = ModuleLoaderState.INIT; // These data structures are initialized here because other // module's startUp() might be called before ours this.messageListeners = new ConcurrentHashMap<OFType, ListenerDispatcher<OFType, IOFMessageListener>>(); this.haListeners = new ListenerDispatcher<HAListenerTypeMarker, IHAListener>(); this.controllerNodeIPsCache = new HashMap<String, String>(); this.updates = new LinkedBlockingQueue<IUpdate>(); this.providerMap = new HashMap<String, List<IInfoProvider>>(); setConfigParams(configParams); HARole initialRole = getInitialRole(configParams); this.notifiedRole = initialRole; this.shutdownService = new ShutdownServiceImpl(); this.roleManager = new RoleManager(this, this.shutdownService, this.notifiedRole, INITIAL_ROLE_CHANGE_DESCRIPTION); this.timer = new HashedWheelTimer(); // Switch Service Startup this.switchService.registerLogicalOFMessageCategory(LogicalOFMessageCategory.MAIN); this.switchService.addOFSwitchListener(new NotificationSwitchListener()); this.counters = new ControllerCounters(debugCounterService); }
/** * */ public MockFloodlightProvider(boolean useAsyncUpdates) { listeners = new ConcurrentHashMap<OFType, ListenerDispatcher<OFType, IOFMessageListener>>(); haListeners = new ListenerDispatcher<HAListenerTypeMarker, IHAListener>(); completionListeners = new ConcurrentLinkedQueue<IControllerCompletionListener>(); role = null; this.useAsyncUpdates = useAsyncUpdates; }
/** * Initialize internal data structures */ public void init(Map<String, String> configParams) throws FloodlightModuleException { this.moduleLoaderState = ModuleLoaderState.INIT; // These data structures are initialized here because other // module's startUp() might be called before ours this.messageListeners = new ConcurrentHashMap<OFType, ListenerDispatcher<OFType, IOFMessageListener>>(); this.haListeners = new ListenerDispatcher<HAListenerTypeMarker, IHAListener>(); this.controllerNodeIPsCache = new HashMap<String, String>(); this.updates = new LinkedBlockingQueue<IUpdate>(); this.providerMap = new HashMap<String, List<IInfoProvider>>(); this.completionListeners = new ConcurrentLinkedQueue<IControllerCompletionListener>(); setConfigParams(configParams); HARole initialRole = getInitialRole(configParams); this.notifiedRole = initialRole; this.shutdownService = new ShutdownServiceImpl(); this.roleManager = new RoleManager(this, this.shutdownService, this.notifiedRole, INITIAL_ROLE_CHANGE_DESCRIPTION); this.timer = new HashedWheelTimer(); // Switch Service Startup this.switchService.registerLogicalOFMessageCategory(LogicalOFMessageCategory.MAIN); this.switchService.addOFSwitchListener(new NotificationSwitchListener()); this.counters = new ControllerCounters(debugCounterService); }
/** * */ public MockFloodlightProvider(boolean useAsyncUpdates) { listeners = new ConcurrentHashMap<OFType, ListenerDispatcher<OFType, IOFMessageListener>>(); haListeners = new ListenerDispatcher<HAListenerTypeMarker, IHAListener>(); role = null; this.useAsyncUpdates = useAsyncUpdates; }
/** * */ public MockFloodlightProvider() { listeners = new ConcurrentHashMap<OFType, ListenerDispatcher<OFType, IOFMessageListener>>(); switches = new ConcurrentHashMap<Long, IOFSwitch>(); switchListeners = new CopyOnWriteArrayList<IOFSwitchListener>(); haListeners = new ListenerDispatcher<HAListenerTypeMarker, IHAListener>(); factory = BasicFactory.getInstance(); role = null; }
@Override public boolean isCallbackOrderingPrereq(HAListenerTypeMarker type, String name) { return ("topology".equals(name) || "bvsmanager".equals(name)); }
@Override public boolean isCallbackOrderingPostreq(HAListenerTypeMarker type, String name) { return false; }
@Override public boolean isCallbackOrderingPrereq(HAListenerTypeMarker type, String name) { return ("topology".equals(name)); }
@Override public boolean isCallbackOrderingPostreq(HAListenerTypeMarker type, String name) { return "tunnelmanager".equals(name); }
@Override public boolean isCallbackOrderingPrereq(HAListenerTypeMarker type, String name) { return false; }
@Override public boolean isCallbackOrderingPrereq(HAListenerTypeMarker type, String name) { return "linkdiscovery".equals(name) || "tunnelmanager".equals(name); }
@Override public boolean isCallbackOrderingPostreq(HAListenerTypeMarker type, String name) { // TODO Auto-generated method stub return false; }