当前位置: 首页>>代码示例>>Java>>正文


Java FloodlightModuleException类代码示例

本文整理汇总了Java中net.floodlightcontroller.core.module.FloodlightModuleException的典型用法代码示例。如果您正苦于以下问题:Java FloodlightModuleException类的具体用法?Java FloodlightModuleException怎么用?Java FloodlightModuleException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FloodlightModuleException类属于net.floodlightcontroller.core.module包,在下文中一共展示了FloodlightModuleException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
		throws FloodlightModuleException {
	linkDiscoveryService = context.getServiceImpl(ILinkDiscoveryService.class);
	threadPoolService = context.getServiceImpl(IThreadPoolService.class);
	floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
	switchService = context.getServiceImpl(IOFSwitchService.class);
	restApiService = context.getServiceImpl(IRestApiService.class);
	debugCounterService = context.getServiceImpl(IDebugCounterService.class);
	debugEventService = context.getServiceImpl(IDebugEventService.class);

	switchPorts = new HashMap<DatapathId, Set<OFPort>>();
	switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
	directLinks = new HashMap<NodePortTuple, Set<Link>>();
	portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
	tunnelPorts = new HashSet<NodePortTuple>();
	topologyAware = new ArrayList<ITopologyListener>();
	ldUpdates = new LinkedBlockingQueue<LDUpdate>();
	haListener = new HAListenerDelegate();
	registerTopologyDebugCounters();
	registerTopologyDebugEvents();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:23,代码来源:TopologyManager.java

示例2: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException 
{
	
	floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
	
       deviceService = context.getServiceImpl(IDeviceService.class);
       routingService = context.getServiceImpl(IRoutingService.class);
       switchService = context.getServiceImpl(IOFSwitchService.class);
	linkService = context.getServiceImpl(ILinkDiscoveryService.class);
	
       messageDamper =  new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
			EnumSet.of(OFType.FLOW_MOD),
			OFMESSAGE_DAMPER_TIMEOUT);
       
	library = new FP_LibFloodlight( LoggerFactory.getLogger( getClass() ));
	
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:19,代码来源:FP_FloodlightRTE.java

示例3: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    syncService = context.getServiceImpl(ISyncService.class);
    debugCounter = context.getServiceImpl(IDebugCounterService.class);

    try {
        syncService.registerStore(SYNC_STORE_NAME, Scope.GLOBAL);
    } catch (SyncException e) {
        throw new FloodlightModuleException(e);
    }
    
    Map<String,String> config = context.getConfigParams(this);
    if (config.containsKey("numWorkers")) {
        numWorkers = Integer.parseInt(config.get("numWorkers"));
    }
    if (config.containsKey("keysPerWorker")) {
        keysPerWorker = Integer.parseInt(config.get("keysPerWorker"));
    }
    if (config.containsKey("iterations")) {
        iterations = Integer.parseInt(config.get("iterations"));
    }
    if (config.containsKey("delay")) {
        delay = Integer.parseInt(config.get("delay"));
    }
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:27,代码来源:SyncTorture.java

示例4: startUp

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void startUp(FloodlightModuleContext context) 
        throws FloodlightModuleException {
    shutdown = false;
    workerExecutor = new NioEventLoopGroup();
    timer = new HashedWheelTimer();
    
    pipelineFactory = new RemoteSyncChannelInitializer(timer, this);
    
    final Bootstrap bootstrap = new Bootstrap()
    .channel(NioSocketChannel.class)
    .group(workerExecutor)
    .option(ChannelOption.SO_REUSEADDR, true)
    .option(ChannelOption.SO_KEEPALIVE, true)
    .option(ChannelOption.TCP_NODELAY, true)
    .option(ChannelOption.SO_SNDBUF, RPCService.SEND_BUFFER_SIZE)
    .option(ChannelOption.SO_RCVBUF, RPCService.SEND_BUFFER_SIZE)
    .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, RPCService.CONNECT_TIMEOUT)
    .handler(pipelineFactory);
    
    clientBootstrap = bootstrap;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:23,代码来源:RemoteSyncManager.java

示例5: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
		throws FloodlightModuleException {
	floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
	threadPoolService = context.getServiceImpl(IThreadPoolService.class);
	debugCounterService = context.getServiceImpl(IDebugCounterService.class);
	flowQueue = new PriorityPendingQueue<OFMatchReconcile>();
	flowReconcileListeners = new ListenerDispatcher<OFType, IFlowReconcileListener>();

	Map<String, String> configParam = context.getConfigParams(this);
	String enableValue = configParam.get(EnableConfigKey);
	registerFlowReconcileManagerDebugCounters();
	// Set flowReconcile default to true
	flowReconcileEnabled = true;
	if (enableValue != null &&
			enableValue.equalsIgnoreCase("false")) {
		flowReconcileEnabled = false;
	}
	flowReconcileThreadRunCount = new AtomicInteger(0);
	lastReconcileTime = new Date(0);
	logger.debug("FlowReconcile is {}", flowReconcileEnabled);
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:23,代码来源:FlowReconcileManager.java

示例6: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
/**
 * 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);
 }
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:33,代码来源:Controller.java

示例7: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
		throws FloodlightModuleException {
	floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
	restApiService = context.getServiceImpl(IRestApiService.class);
	deviceService = context.getServiceImpl(IDeviceService.class);

	vNetsByGuid = new ConcurrentHashMap<String, VirtualNetwork>();
	nameToGuid = new ConcurrentHashMap<String, String>();
	guidToGateway = new ConcurrentHashMap<String, IPv4Address>();
	gatewayToGuid = new ConcurrentHashMap<IPv4Address, Set<String>>();
	macToGuid = new ConcurrentHashMap<MacAddress, String>();
	portToMac = new ConcurrentHashMap<String, MacAddress>();
	macToGateway = new ConcurrentHashMap<MacAddress, IPv4Address>();
	deviceListener = new DeviceListenerImpl();

}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:18,代码来源:VirtualNetworkFilter.java

示例8: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
                                             throws FloodlightModuleException {
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    deviceManagerService = context.getServiceImpl(IDeviceService.class);
    routingEngineService = context.getServiceImpl(IRoutingService.class);
    topologyService = context.getServiceImpl(ITopologyService.class);
    sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    
    vips = new HashMap<String, LBVip>();
    pools = new HashMap<String, LBPool>();
    members = new HashMap<String, LBMember>();
    vipIpToId = new HashMap<Integer, String>();
    vipIpToMac = new HashMap<Integer, MacAddress>();
    memberIpToId = new HashMap<Integer, String>();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:20,代码来源:LoadBalancer.java

示例9: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setDebugCounter(
       context.getServiceImpl(IDebugCounterService.class));
   controller.setDebugEvent(
       context.getServiceImpl(IDebugEventService.class));
   controller.setRestApiService(
       context.getServiceImpl(IRestApiService.class));
   controller.setThreadPoolService(
       context.getServiceImpl(IThreadPoolService.class));
   controller.setSyncService(
       context.getServiceImpl(ISyncService.class));
   controller.setSwitchService(
	   context.getServiceImpl(IOFSwitchService.class));
   controller.init(context.getConfigParams(this));
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:21,代码来源:FloodlightProvider.java

示例10: startUp

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void startUp(FloodlightModuleContext context)
        throws FloodlightModuleException {
    try {
        final IStoreClient<String, TortureValue> storeClient = 
                syncService.getStoreClient(SYNC_STORE_NAME, 
                                           String.class, 
                                           TortureValue.class);
        for (int i = 0; i < numWorkers; i++) {
            Thread thread = new Thread(new TortureWorker(storeClient, i),
                                       "Torture-" + i);
            thread.setPriority(Thread.MIN_PRIORITY);
            thread.start();
        }
    } catch (Exception e) {
        throw new FloodlightModuleException(e);
    }
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:19,代码来源:SyncTorture.java

示例11: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    ofSwitchService = context.getServiceImpl(IOFSwitchService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    kafkaProducer = context.getServiceImpl(KafkaMessageProducer.class);
    // TODO: Ensure Kafka Topics are created..
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:12,代码来源:SwitchManager.java

示例12: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
		throws FloodlightModuleException {
	floodlightProvider = context .getServiceImpl(IFloodlightProviderService.class);
	switchStates = new HashMap<IOFSwitch,ObfuscationSwitchState>();
	oMaskManager = context.getServiceImpl(IObfuscationMaskManager.class);
	
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:9,代码来源:ObfuscationSwitchStateManager.java

示例13: init

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    switchService = context.getServiceImpl(IOFSwitchService.class);
    threadPoolService = context.getServiceImpl(IThreadPoolService.class);
    kafkaProducer = context.getServiceImpl(KafkaMessageProducer.class);
    Map<String, String> configParameters = context.getConfigParams(this);
    interval = Integer.valueOf(configParameters.get("interval"));
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:9,代码来源:StatisticsService.java

示例14: registerTopologyDebugEvents

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
protected void registerTopologyDebugEvents() throws FloodlightModuleException {
	if (debugEventService == null) {
		log.error("debugEventService should not be null. Has IDebugEventService been loaded previously?");
	}
	eventCategory = debugEventService.buildEvent(TopologyEvent.class)
			.setModuleName(PACKAGE)
			.setEventName("topologyevent")
			.setEventDescription("Topology Computation")
			.setEventType(EventType.ALWAYS_LOG)
			.setBufferCapacity(100)
			.register();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:13,代码来源:TopologyManager.java

示例15: setUp

import net.floodlightcontroller.core.module.FloodlightModuleException; //导入依赖的package包/类
@Before
public void setUp() throws FloodlightModuleException {
    ofSwitchService = createMock(IOFSwitchService.class);
    restApiService = createMock(IRestApiService.class);
    iofSwitch = createMock(IOFSwitch.class);
    switchDescription = createMock(SwitchDescription.class);
    dpid = createMock(DatapathId.class);

    context.addService(IRestApiService.class, restApiService);
    context.addService(IOFSwitchService.class, ofSwitchService);

    switchManager = new SwitchManager();
    switchManager.init(context);
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:15,代码来源:SwitchManagerTest.java


注:本文中的net.floodlightcontroller.core.module.FloodlightModuleException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。