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


Java IStorageSourceService类代码示例

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


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

示例1: init

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public void init(SyncManager syncManager,
                 FloodlightModuleContext context) {
    storageSource = context.getServiceImpl(IStorageSourceService.class);

    // storageSource.addListener(CONTROLLER_TABLE_NAME, this);

    Map<String, String> config =
            context.getConfigParams(FloodlightProvider.class);
    thisControllerID = config.get("controllerid");

    config = context.getConfigParams(SyncManager.class);
    keyStorePath = config.get("keyStorePath");
    keyStorePassword = config.get("keyStorePassword");
    authScheme = AuthScheme.NO_AUTH;
    try {
        authScheme = AuthScheme.valueOf(config.get("authScheme"));
    } catch (Exception e) {}
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:20,代码来源:StorageCCProvider.java

示例2: del

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Post
public String del(String fmJson) {
    IStorageSourceService storageSource =
            (IStorageSourceService)getContext().getAttributes().
                get(IStorageSourceService.class.getCanonicalName());
    String fmName = null;
    if (fmJson == null) {
        return "{\"status\" : \"Error! No data posted.\"}";
    }
    try {
        fmName = StaticFlowEntries.getEntryNameFromJson(fmJson);
        if (fmName == null) {
            return "{\"status\" : \"Error deleting entry, no name provided\"}";
        }
    } catch (IOException e) {
        log.error("Error deleting flow mod request: " + fmJson, e);
        return "{\"status\" : \"Error deleting entry, see log for details\"}";
    }

    storageSource.deleteRowAsync(StaticFlowEntryPusher.TABLE_NAME, fmName);
    return "{\"status\" : \"Entry " + fmName + " deleted\"}";
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:23,代码来源:StaticFlowEntryDeleteResource.java

示例3: del

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Delete
public String del(String fmJson) {
	IStorageSourceService storageSource =
			(IStorageSourceService)getContext().getAttributes().
			get(IStorageSourceService.class.getCanonicalName());
	String fmName = null;
	if (fmJson == null) {
		return "{\"status\" : \"Error! No data posted.\"}";
	}
	try {
		fmName = StaticFlowEntries.getEntryNameFromJson(fmJson);
		if (fmName == null) {
			return "{\"status\" : \"Error deleting entry, no name provided\"}";
		}
	} catch (IOException e) {
		log.error("Error deleting flow mod request: " + fmJson, e);
		return "{\"status\" : \"Error deleting entry, see log for details\"}";
	}

	storageSource.deleteRowAsync(StaticFlowEntryPusher.TABLE_NAME, fmName);
	return "{\"status\" : \"Entry " + fmName + " deleted\"}";
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:23,代码来源:StaticFlowEntryPusherResource.java

示例4: notify

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Post("json")
public Map<String,Object> notify(String entity) throws Exception {
    List<StorageSourceNotification> notifications = null;
    ObjectMapper mapper = new ObjectMapper();
    notifications = 
        mapper.readValue(entity, 
                new TypeReference<List<StorageSourceNotification>>(){});
    
    IStorageSourceService storageSource = 
        (IStorageSourceService)getContext().getAttributes().
            get(IStorageSourceService.class.getCanonicalName());
    storageSource.notifyListeners(notifications);
    
    HashMap<String, Object> model = new HashMap<String,Object>();
    model.put("output", "OK");
    return model;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:18,代码来源:StorageNotifyResource.java

示例5: init

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的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

示例6: del

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Post
@LogMessageDoc(level="ERROR",
    message="Error deleting flow mod request: {request}",
    explanation="An invalid delete request was sent to static flow pusher",
    recommendation="Fix the format of the static flow mod request")
public String del(String fmJson) {
    IStorageSourceService storageSource =
            (IStorageSourceService)getContext().getAttributes().
                get(IStorageSourceService.class.getCanonicalName());
    String fmName = null;
    if (fmJson == null) {
        return "{\"status\" : \"Error! No data posted.\"}";
    }
    try {
        fmName = StaticFlowEntries.getEntryNameFromJson(fmJson);
        if (fmName == null) {
            return "{\"status\" : \"Error deleting entry, no name provided\"}";
        }
    } catch (IOException e) {
        log.error("Error deleting flow mod request: " + fmJson, e);
        return "{\"status\" : \"Error deleting entry, see log for details\"}";
    }

    storageSource.deleteRowAsync(StaticFlowEntryPusher.TABLE_NAME, fmName);
    return "{\"status\" : \"Entry " + fmName + " deleted\"}";
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:27,代码来源:StaticFlowEntryDeleteResource.java

示例7: del

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Delete
@LogMessageDoc(level="ERROR",
message="Error deleting flow mod request: {request}",
explanation="An invalid delete request was sent to static flow pusher",
recommendation="Fix the format of the static flow mod request")
public String del(String fmJson) {
	IStorageSourceService storageSource =
			(IStorageSourceService)getContext().getAttributes().
			get(IStorageSourceService.class.getCanonicalName());
	String fmName = null;
	if (fmJson == null) {
		return "{\"status\" : \"Error! No data posted.\"}";
	}
	try {
		fmName = StaticFlowEntries.getEntryNameFromJson(fmJson);
		if (fmName == null) {
			return "{\"status\" : \"Error deleting entry, no name provided\"}";
		}
	} catch (IOException e) {
		log.error("Error deleting flow mod request: " + fmJson, e);
		return "{\"status\" : \"Error deleting entry, see log for details\"}";
	}

	storageSource.deleteRowAsync(StaticFlowEntryPusher.TABLE_NAME, fmName);
	return "{\"status\" : \"Entry " + fmName + " deleted\"}";
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:27,代码来源:StaticFlowEntryPusherResource.java

示例8: notify

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Post("json")
public Map<String,Object> notify(String entity) throws Exception {
    List<StorageSourceNotification> notifications = null;
    ObjectMapper mapper = new ObjectMapper();
    notifications =
        mapper.readValue(entity,
                new TypeReference<List<StorageSourceNotification>>(){});

    IStorageSourceService storageSource =
        (IStorageSourceService)getContext().getAttributes().
            get(IStorageSourceService.class.getCanonicalName());
    storageSource.notifyListeners(notifications);

    HashMap<String, Object> model = new HashMap<String,Object>();
    model.put("output", "OK");
    return model;
}
 
开发者ID:zhenshengcai,项目名称:floodlight-hardware,代码行数:18,代码来源:StorageNotifyResource.java

示例9: init

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
   controller.setStorageSourceService(
       context.getServiceImpl(IStorageSourceService.class));
   controller.setPktInProcessingService(
       context.getServiceImpl(IPktInProcessingTimeService.class));
   controller.setCounterStore(
       context.getServiceImpl(ICounterStoreService.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.init(context.getConfigParams(this));
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:21,代码来源:FloodlightProvider.java

示例10: getModuleDependencies

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>>
getModuleDependencies() {
	Collection<Class<? extends IFloodlightService>> l =
			new ArrayList<Class<? extends IFloodlightService>>();
	l.add(IThreadPoolService.class);
	l.add(IStorageSourceService.class);
	l.add(IDebugCounterService.class);
	return l;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:SyncManager.java

示例11: getModuleDependencies

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
	Collection<Class<? extends IFloodlightService>> l =
			new ArrayList<Class<? extends IFloodlightService>>();
	l.add(IFloodlightProviderService.class);
	l.add(IStorageSourceService.class);
	l.add(ITopologyService.class);
	l.add(IRestApiService.class);
	l.add(IThreadPoolService.class);
	l.add(IEntityClassifierService.class);
	l.add(ISyncService.class);
	return l;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:DeviceManagerImpl.java

示例12: init

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext fmc) throws FloodlightModuleException {
	this.perClassIndices =
			new HashSet<EnumSet<DeviceField>>();
	addIndex(true, EnumSet.of(DeviceField.IPv4));
	addIndex(true, EnumSet.of(DeviceField.IPv6));

	this.deviceListeners = new ListenerDispatcher<String, IDeviceListener>();
	this.suppressAPs = Collections.newSetFromMap(
			new ConcurrentHashMap<SwitchPort, Boolean>());

	this.floodlightProvider =
			fmc.getServiceImpl(IFloodlightProviderService.class);
	this.storageSource =
			fmc.getServiceImpl(IStorageSourceService.class);
	this.topology =
			fmc.getServiceImpl(ITopologyService.class);
	this.restApi = fmc.getServiceImpl(IRestApiService.class);
	this.threadPool = fmc.getServiceImpl(IThreadPoolService.class);
	this.entityClassifier = fmc.getServiceImpl(IEntityClassifierService.class);
	this.debugCounters = fmc.getServiceImpl(IDebugCounterService.class);
	this.debugEventService = fmc.getServiceImpl(IDebugEventService.class);
	this.syncService = fmc.getServiceImpl(ISyncService.class);
	this.deviceSyncManager = new DeviceSyncManager();
	this.haListenerDelegate = new HAListenerDelegate();
	registerDeviceManagerDebugCounters();
	registerDeviceManagerDebugEvents();
	this.addListener(new DeviceDebugEventLogger());
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:30,代码来源:DeviceManagerImpl.java

示例13: getModuleDependencies

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
	Collection<Class<? extends IFloodlightService>> l =
			new ArrayList<Class<? extends IFloodlightService>>();
	l.add(IFloodlightProviderService.class);
	l.add(IStorageSourceService.class);
	l.add(IThreadPoolService.class);
	l.add(IRestApiService.class);
	l.add(IShutdownService.class);
	return l;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:12,代码来源:LinkDiscoveryManager.java

示例14: init

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
		throws FloodlightModuleException {
	restApi = context.getServiceImpl(IRestApiService.class);
	deviceManager = context.getServiceImpl(IDeviceService.class);
	logger = LoggerFactory.getLogger(ACL.class);
	storageSource = context.getServiceImpl(IStorageSourceService.class);

	aclRules = new TreeMap<>();
	apManager = new APManager();
	ruleId2FlowName = new HashMap<>();
	ruleId2Dpid = new HashMap<>();
	dpid2FlowPriority = new HashMap<>();
	deny2Allow = new HashMap<>();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:16,代码来源:ACL.java

示例15: getModuleDependencies

import net.floodlightcontroller.storage.IStorageSourceService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
	Collection<Class<? extends IFloodlightService>> l =
			new ArrayList<Class<? extends IFloodlightService>>();
	l.add(IFloodlightProviderService.class);
	l.add(IOFSwitchService.class);
	l.add(IStorageSourceService.class);
	l.add(IRestApiService.class);
	return l;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:StaticFlowEntryPusher.java


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