Java 类net.floodlightcontroller.core.IOFSwitchDriver 实例源码

项目:QoS-floodlight    文件:NaiiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(String manufacturerDescPrefix,
                                         IOFSwitchDriver driver) {
    if (manufacturerDescPrefix == null) {
        throw new NullPointerException("manufacturerDescrptionPrefix" +
                " must not be null");
    }
    if (driver == null) {
        throw new NullPointerException("driver must not be null");
    }

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:floodlight_with_topoguard    文件:NaiiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(String manufacturerDescPrefix,
                                         IOFSwitchDriver driver) {
    if (manufacturerDescPrefix == null) {
        throw new NullPointerException("manufacturerDescrptionPrefix" +
                " must not be null");
    }
    if (driver == null) {
        throw new NullPointerException("driver must not be null");
    }

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:FloodligtModule    文件:NaiiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(String manufacturerDescPrefix,
                                         IOFSwitchDriver driver) {
    if (manufacturerDescPrefix == null) {
        throw new NullPointerException("manufacturerDescrptionPrefix" +
                " must not be null");
    }
    if (driver == null) {
        throw new NullPointerException("driver must not be null");
    }

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:multicastSDN    文件:NaiiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(String manufacturerDescPrefix,
                                         IOFSwitchDriver driver) {
    if (manufacturerDescPrefix == null) {
        throw new NullPointerException("manufacturerDescrptionPrefix" +
                " must not be null");
    }
    if (driver == null) {
        throw new NullPointerException("driver must not be null");
    }

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:floodlight-nfv    文件:Controller.java   
@Override
public void addOFSwitchDriver(String description, IOFSwitchDriver driver) {
    IOFSwitchDriver existingDriver = switchBindingMap.get(description);
    if (existingDriver != null) {
        log.warn("Failed to add OFSwitch driver for {}, " +
                 "already registered", description);
        return;
    }
    switchBindingMap.put(description, driver);

    // Sort so we match the longest string first
    int index = -1;
    for (String desc : switchDescSortedList) {
        if (description.compareTo(desc) > 0) {
            index = switchDescSortedList.indexOf(desc);
            switchDescSortedList.add(index, description);
            break;
        }
    }
    if (index == -1) {  // append to list
        switchDescSortedList.add(description);
    }
}
项目:floodlight-oss    文件:Controller.java   
@Override
public void addOFSwitchDriver(String description, IOFSwitchDriver driver) {
    IOFSwitchDriver existingDriver = switchBindingMap.get(description);
    if (existingDriver != null) {
        log.warn("Failed to add OFSwitch driver for {}, " +
                 "already registered", description);
        return;
    }
    switchBindingMap.put(description, driver);

    // Sort so we match the longest string first
    int index = -1;
    for (String desc : switchDescSortedList) {
        if (description.compareTo(desc) > 0) {
            index = switchDescSortedList.indexOf(desc);
            switchDescSortedList.add(index, description);
            break;
        }
    }
    if (index == -1) {  // append to list
        switchDescSortedList.add(description);
    }
}
项目:FL_HAND    文件:Controller.java   
/**
 * Initialize internal data structures
 */
public void init(Map<String, String> configParams) {
    // 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.switchListeners = new CopyOnWriteArraySet<IOFSwitchListener>();
    this.haListeners = new CopyOnWriteArraySet<IHAListener>();
    this.switchBindingMap =
            new ConcurrentHashMap<String, IOFSwitchDriver>();
    this.switchDescSortedList = new ArrayList<String>();
    this.activeSwitches = new ConcurrentHashMap<Long, IOFSwitch>();
    this.connectedSwitches = new HashSet<IOFSwitch>();
    this.controllerNodeIPsCache = new HashMap<String, String>();
    this.updates = new LinkedBlockingQueue<IUpdate>();
    this.factory = new BasicFactory();
    this.providerMap = new HashMap<String, List<IInfoProvider>>();
    setConfigParams(configParams);
    this.role = getInitialRole(configParams);
    this.notifiedRole = this.role;
    this.roleChanger = new RoleChanger(this);
    initVendorMessages();
    this.systemStartTime = System.currentTimeMillis();
}
项目:FL_HAND    文件:Controller.java   
@Override
public void addOFSwitchDriver(String description, IOFSwitchDriver driver) {
    IOFSwitchDriver existingDriver = switchBindingMap.get(description);
    if (existingDriver != null) {
        log.warn("Failed to add OFSwitch driver for {}, " +
                 "already registered", description);
        return;
    }
    switchBindingMap.put(description, driver);

    // Sort so we match the longest string first
    int index = -1;
    for (String desc : switchDescSortedList) {
        if (description.compareTo(desc) > 0) {
            index = switchDescSortedList.indexOf(desc);
            switchDescSortedList.add(index, description);
            break;
        }
    }
    if (index == -1) {  // append to list
        switchDescSortedList.add(description);
    }
}
项目:fresco_floodlight    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:iTAP-controller    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:SDN-Multicast    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:arscheduler    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:floodlight1.2-delay    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:floodlight-hardware    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:ACAMPController    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:fast-failover-demo    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:fast-failover-demo    文件:OFSwitchManagerTest.java   
/**
 * Test SwitchDriverRegistry
 * Test fallback to default if no switch driver is registered for a
 * particular prefix
 */
@Test
public void testSwitchDriverRegistryNoDriver() {
    IOFSwitchDriver driver = createMock(IOFSwitchDriver.class);
    IOFSwitch returnedSwitch = null;
    IOFSwitchBackend mockSwitch = createMock(IOFSwitchBackend.class);
    switchManager.addOFSwitchDriver("test switch", driver);

    replay(driver);
    replay(mockSwitch);

    SwitchDescription desc = new SwitchDescription("test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    mockSwitch.setSwitchProperties(desc);
    expectLastCall().once();
    expect(driver.getOFSwitchImpl(desc, factory)).andReturn(mockSwitch).once();
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc, factory, DatapathId.of(1));
    assertSame(mockSwitch, returnedSwitch);
    verify(driver);
    verify(mockSwitch);

    desc = new SwitchDescription("Foo Bar test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc,
            OFFactories.getFactory(OFVersion.OF_10), DatapathId.of(1));
    assertNotNull(returnedSwitch);
    assertTrue("Returned switch should be OFSwitch",
               returnedSwitch instanceof OFSwitch);
    assertEquals(desc, returnedSwitch.getSwitchDescription());
    verify(driver);
    verify(mockSwitch);
}
项目:floodlightLB    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:floodlightLB    文件:OFSwitchManagerTest.java   
/**
 * Test SwitchDriverRegistry
 * Test fallback to default if no switch driver is registered for a
 * particular prefix
 */
@Test
public void testSwitchDriverRegistryNoDriver() {
    IOFSwitchDriver driver = createMock(IOFSwitchDriver.class);
    IOFSwitch returnedSwitch = null;
    IOFSwitchBackend mockSwitch = createMock(IOFSwitchBackend.class);
    switchManager.addOFSwitchDriver("test switch", driver);

    replay(driver);
    replay(mockSwitch);

    SwitchDescription desc = new SwitchDescription("test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    mockSwitch.setSwitchProperties(desc);
    expectLastCall().once();
    expect(driver.getOFSwitchImpl(desc, factory)).andReturn(mockSwitch).once();
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc, factory, DatapathId.of(1));
    assertSame(mockSwitch, returnedSwitch);
    verify(driver);
    verify(mockSwitch);

    desc = new SwitchDescription("Foo Bar test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc,
            OFFactories.getFactory(OFVersion.OF_10), DatapathId.of(1));
    assertNotNull(returnedSwitch);
    assertTrue("Returned switch should be OFSwitch",
               returnedSwitch instanceof OFSwitch);
    assertEquals(desc, returnedSwitch.getSwitchDescription());
    verify(driver);
    verify(mockSwitch);
}
项目:DSC    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:DSC    文件:OFSwitchManagerTest.java   
/**
 * Test SwitchDriverRegistry
 * Test fallback to default if no switch driver is registered for a
 * particular prefix
 */
@Test
public void testSwitchDriverRegistryNoDriver() {
    IOFSwitchDriver driver = createMock(IOFSwitchDriver.class);
    IOFSwitch returnedSwitch = null;
    IOFSwitchBackend mockSwitch = createMock(IOFSwitchBackend.class);
    switchManager.addOFSwitchDriver("test switch", driver);

    replay(driver);
    replay(mockSwitch);

    SwitchDescription desc = new SwitchDescription("test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    mockSwitch.setSwitchProperties(desc);
    expectLastCall().once();
    expect(driver.getOFSwitchImpl(desc, factory)).andReturn(mockSwitch).once();
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc, factory, DatapathId.of(1));
    assertSame(mockSwitch, returnedSwitch);
    verify(driver);
    verify(mockSwitch);

    desc = new SwitchDescription("Foo Bar test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc,
            OFFactories.getFactory(OFVersion.OF_10), DatapathId.of(1));
    assertNotNull(returnedSwitch);
    assertTrue("Returned switch should be OFSwitch",
               returnedSwitch instanceof OFSwitch);
    assertEquals(desc, returnedSwitch.getSwitchDescription());
    verify(driver);
    verify(mockSwitch);
}
项目:floodlight    文件:NaiveSwitchDriverRegistry.java   
@Override
public synchronized void addSwitchDriver(@Nonnull String manufacturerDescPrefix,
                                         @Nonnull IOFSwitchDriver driver) {
    Preconditions.checkNotNull(manufacturerDescPrefix, "manufactererDescProfix");
    Preconditions.checkNotNull(driver, "driver");

    IOFSwitchDriver existingDriver = switchBindingMap.get(manufacturerDescPrefix);
    if (existingDriver != null ) {
        throw new IllegalStateException("Failed to add OFSwitch driver for "
                + manufacturerDescPrefix + "already registered");
    }
    switchBindingMap.put(manufacturerDescPrefix, driver);
    switchDescSorted.add(manufacturerDescPrefix);
}
项目:floodlight    文件:OFSwitchManagerTest.java   
/**
 * Test SwitchDriverRegistry
 * Test fallback to default if no switch driver is registered for a
 * particular prefix
 */
@Test
public void testSwitchDriverRegistryNoDriver() {
    IOFSwitchDriver driver = createMock(IOFSwitchDriver.class);
    IOFSwitch returnedSwitch = null;
    IOFSwitchBackend mockSwitch = createMock(IOFSwitchBackend.class);
    switchManager.addOFSwitchDriver("test switch", driver);

    replay(driver);
    replay(mockSwitch);

    SwitchDescription desc = new SwitchDescription("test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    mockSwitch.setSwitchProperties(desc);
    expectLastCall().once();
    expect(driver.getOFSwitchImpl(desc, factory)).andReturn(mockSwitch).once();
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc, factory, DatapathId.of(1));
    assertSame(mockSwitch, returnedSwitch);
    verify(driver);
    verify(mockSwitch);

    desc = new SwitchDescription("Foo Bar test switch", "version 0.9", "", "", "");
    reset(driver);
    reset(mockSwitch);
    replay(driver);
    replay(mockSwitch);
    returnedSwitch = switchManager.getOFSwitchInstance(new NullConnection(), desc,
            OFFactories.getFactory(OFVersion.OF_10), DatapathId.of(1));
    assertNotNull(returnedSwitch);
    assertTrue("Returned switch should be OFSwitch",
               returnedSwitch instanceof OFSwitch);
    assertEquals(desc, returnedSwitch.getSwitchDescription());
    verify(driver);
    verify(mockSwitch);
}
项目:floodlight-nfv    文件:Controller.java   
/**
 * Initialize internal data structures
 */
public void init(Map<String, String> configParams) {
    // 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.switchListeners = new CopyOnWriteArraySet<IOFSwitchListener>();
    this.haListeners = new CopyOnWriteArraySet<IHAListener>();
    this.switchBindingMap =
            new ConcurrentHashMap<String, IOFSwitchDriver>();
    this.switchDescSortedList = new ArrayList<String>();
    this.activeSwitches = new ConcurrentHashMap<Long, IOFSwitch>();
    this.connectedSwitches = new HashSet<IOFSwitch>();
    this.controllerNodeIPsCache = new HashMap<String, String>();
    this.updates = new LinkedBlockingQueue<IUpdate>();
    this.factory = new BasicFactory();
    this.providerMap = new HashMap<String, List<IInfoProvider>>();
    setConfigParams(configParams);
    this.role = getInitialRole(configParams);
    this.notifiedRole = this.role;
    this.roleChanger = new RoleChanger(this);
    initVendorMessages();

    String option = configParams.get("flushSwitchesOnReconnect");

    if (option != null && option.equalsIgnoreCase("true")) {
        this.setAlwaysClearFlowsOnSwAdd(true);
        log.info("Flush switches on reconnect -- Enabled.");
    } else {
        this.setAlwaysClearFlowsOnSwAdd(false);
        log.info("Flush switches on reconnect -- Disabled");
    }
 }
项目:floodlight-oss    文件:Controller.java   
/**
 * Initialize internal data structures
 */
public void init(Map<String, String> configParams) {
    // 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.switchListeners = new CopyOnWriteArraySet<IOFSwitchListener>();
    this.haListeners = new CopyOnWriteArraySet<IHAListener>();
    this.switchBindingMap =
            new ConcurrentHashMap<String, IOFSwitchDriver>();
    this.switchDescSortedList = new ArrayList<String>();
    this.activeSwitches = new ConcurrentHashMap<Long, IOFSwitch>();
    this.connectedSwitches = new HashSet<IOFSwitch>();
    this.controllerNodeIPsCache = new HashMap<String, String>();
    this.updates = new LinkedBlockingQueue<IUpdate>();
    this.factory = new BasicFactory();
    this.providerMap = new HashMap<String, List<IInfoProvider>>();
    setConfigParams(configParams);
    this.role = getInitialRole(configParams);
    this.notifiedRole = this.role;
    this.roleChanger = new RoleChanger(this);
    initVendorMessages();

    String option = configParams.get("flushSwitchesOnReconnect");

    if (option != null && option.equalsIgnoreCase("true")) {
        this.setAlwaysClearFlowsOnSwAdd(true);
        log.info("Flush switches on reconnect -- Enabled.");
    } else {
        this.setAlwaysClearFlowsOnSwAdd(false);
        log.info("Flush switches on reconnect -- Disabled");
    }
 }
项目:open-kilda    文件:MockSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
                              IOFSwitchDriver driver) {
    // do nothing

}
项目:fresco_floodlight    文件:NaiveSwitchDriverRegistry.java   
public NaiveSwitchDriverRegistry(@Nonnull IOFSwitchManager switchManager) {
    Preconditions.checkNotNull(switchManager, "switchManager must not be null");
    this.switchManager  = switchManager;
    switchBindingMap = new HashMap<String, IOFSwitchDriver>();
    switchDescSorted = new TreeSet<String>(Collections.reverseOrder());
}
项目:fresco_floodlight    文件:OFSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
        IOFSwitchDriver driver) {
    this.driverRegistry.addSwitchDriver(manufacturerDescriptionPrefix, driver);
}
项目:fresco_floodlight    文件:MockSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
                              IOFSwitchDriver driver) {
    // do nothing

}
项目:iTAP-controller    文件:NaiveSwitchDriverRegistry.java   
public NaiveSwitchDriverRegistry(@Nonnull IOFSwitchManager switchManager) {
    Preconditions.checkNotNull(switchManager, "switchManager must not be null");
    this.switchManager  = switchManager;
    switchBindingMap = new HashMap<String, IOFSwitchDriver>();
    switchDescSorted = new TreeSet<String>(Collections.reverseOrder());
}
项目:iTAP-controller    文件:OFSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
        IOFSwitchDriver driver) {
    this.driverRegistry.addSwitchDriver(manufacturerDescriptionPrefix, driver);
}
项目:iTAP-controller    文件:MockSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
                              IOFSwitchDriver driver) {
    // do nothing

}
项目:SDN-Multicast    文件:NaiveSwitchDriverRegistry.java   
public NaiveSwitchDriverRegistry(@Nonnull IOFSwitchManager switchManager) {
    Preconditions.checkNotNull(switchManager, "switchManager must not be null");
    this.switchManager  = switchManager;
    switchBindingMap = new HashMap<String, IOFSwitchDriver>();
    switchDescSorted = new TreeSet<String>(Collections.reverseOrder());
}
项目:SDN-Multicast    文件:OFSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
        IOFSwitchDriver driver) {
    this.driverRegistry.addSwitchDriver(manufacturerDescriptionPrefix, driver);
}
项目:SDN-Multicast    文件:MockSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
                              IOFSwitchDriver driver) {
    // do nothing

}
项目:arscheduler    文件:NaiveSwitchDriverRegistry.java   
public NaiveSwitchDriverRegistry(@Nonnull IOFSwitchManager switchManager) {
    Preconditions.checkNotNull(switchManager, "switchManager must not be null");
    this.switchManager  = switchManager;
    switchBindingMap = new HashMap<String, IOFSwitchDriver>();
    switchDescSorted = new TreeSet<String>(Collections.reverseOrder());
}
项目:arscheduler    文件:OFSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
        IOFSwitchDriver driver) {
    this.driverRegistry.addSwitchDriver(manufacturerDescriptionPrefix, driver);
}
项目:arscheduler    文件:MockSwitchManager.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
                              IOFSwitchDriver driver) {
    // do nothing

}
项目:QoS-floodlight    文件:Controller.java   
@Override
public void addOFSwitchDriver(String manufacturerDescriptionPrefix,
                              IOFSwitchDriver driver) {
    driverRegistry.addSwitchDriver(manufacturerDescriptionPrefix, driver);
}
项目:QoS-floodlight    文件:NaiiveSwitchDriverRegistry.java   
public NaiiveSwitchDriverRegistry() {
    switchBindingMap = new HashMap<String, IOFSwitchDriver>();
    switchDescSorted = new TreeSet<String>(Collections.reverseOrder());
}