本文整理汇总了Java中net.floodlightcontroller.util.EventHistory类的典型用法代码示例。如果您正苦于以下问题:Java EventHistory类的具体用法?Java EventHistory怎么用?Java EventHistory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventHistory类属于net.floodlightcontroller.util包,在下文中一共展示了EventHistory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleEvHistReq
import net.floodlightcontroller.util.EventHistory; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologyCluster> handleEvHistReq() {
// Get the event history count. Last <count> events would be returned
String evHistCount = (String)getRequestAttributes().get("count");
int count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
try {
count = Integer.parseInt(evHistCount);
}
catch(NumberFormatException nFE) {
// Invalid input for event count - use default value
}
LinkDiscoveryManager topoManager =
(LinkDiscoveryManager)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
if (topoManager != null) {
return new EventHistory<EventHistoryTopologyCluster>(
topoManager.evHistTopologyCluster, count);
}
return null;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:24,代码来源:EventHistoryTopologyClusterResource.java
示例2: handleEvHistReq
import net.floodlightcontroller.util.EventHistory; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologySwitch> handleEvHistReq() {
// Get the event history count. Last <count> events would be returned
String evHistCount = (String)getRequestAttributes().get("count");
int count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
try {
count = Integer.parseInt(evHistCount);
}
catch(NumberFormatException nFE) {
// Invalid input for event count - use default value
}
LinkDiscoveryManager topoManager =
(LinkDiscoveryManager)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
return new EventHistory<EventHistoryTopologySwitch>(
topoManager.evHistTopologySwitch, count);
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:21,代码来源:EventHistoryTopologySwitchResource.java
示例3: handleEvHistReq
import net.floodlightcontroller.util.EventHistory; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologyLink> handleEvHistReq() {
// Get the event history count. Last <count> events would be returned
String evHistCount = (String)getRequestAttributes().get("count");
int count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
try {
count = Integer.parseInt(evHistCount);
}
catch(NumberFormatException nFE) {
// Invalid input for event count - use default value
}
LinkDiscoveryManager linkDiscoveryManager =
(LinkDiscoveryManager)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
if (linkDiscoveryManager != null) {
return new EventHistory<EventHistoryTopologyLink>(
linkDiscoveryManager.evHistTopologyLink, count);
}
return null;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:24,代码来源:EventHistoryTopologyLinkResource.java
示例4: init
import net.floodlightcontroller.util.EventHistory; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
storageSource = context.getServiceImpl(IStorageSourceService.class);
threadPool = context.getServiceImpl(IThreadPoolService.class);
restApi = context.getServiceImpl(IRestApiService.class);
// Set the autoportfast feature to false.
this.autoPortFastFeature = false;
// We create this here because there is no ordering guarantee
this.linkDiscoveryAware = new ArrayList<ILinkDiscoveryListener>();
this.lock = new ReentrantReadWriteLock();
this.updates = new LinkedBlockingQueue<LDUpdate>();
this.links = new HashMap<Link, LinkInfo>();
this.portLinks = new HashMap<NodePortTuple, Set<Link>>();
this.suppressLinkDiscovery =
Collections.synchronizedSet(new HashSet<NodePortTuple>());
this.portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
this.switchLinks = new HashMap<Long, Set<Link>>();
this.quarantineQueue = new LinkedBlockingQueue<NodePortTuple>();
this.maintenanceQueue = new LinkedBlockingQueue<NodePortTuple>();
this.evHistTopologySwitch =
new EventHistory<EventHistoryTopologySwitch>("Topology: Switch");
this.evHistTopologyLink =
new EventHistory<EventHistoryTopologyLink>("Topology: Link");
this.evHistTopologyCluster =
new EventHistory<EventHistoryTopologyCluster>("Topology: Cluster");
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:32,代码来源:LinkDiscoveryManager.java
示例5: init
import net.floodlightcontroller.util.EventHistory; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
storageSource = context.getServiceImpl(IStorageSourceService.class);
threadPool = context.getServiceImpl(IThreadPoolService.class);
restApi = context.getServiceImpl(IRestApiService.class);
debugCounters = context.getServiceImpl(IDebugCounterService.class);
// read our config options
Map<String, String> configOptions = context.getConfigParams(this);
try {
String histSize = configOptions.get("eventhistorysize");
if (histSize != null) {
EVENT_HISTORY_SIZE = Short.parseShort(histSize);
}
} catch (NumberFormatException e) {
log.warn("Error event history size, using default of {} seconds", EVENT_HISTORY_SIZE);
}
log.debug("Event history size set to {}", EVENT_HISTORY_SIZE);
// Set the autoportfast feature to false.
this.autoPortFastFeature = AUTOPORTFAST_DEFAULT;
// We create this here because there is no ordering guarantee
this.linkDiscoveryAware = new ArrayList<ILinkDiscoveryListener>();
this.lock = new ReentrantReadWriteLock();
this.updates = new LinkedBlockingQueue<LDUpdate>();
this.links = new HashMap<Link, LinkInfo>();
this.portLinks = new HashMap<NodePortTuple, Set<Link>>();
this.suppressLinkDiscovery = Collections.synchronizedSet(new HashSet<NodePortTuple>());
this.portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
this.switchLinks = new HashMap<Long, Set<Link>>();
this.quarantineQueue = new LinkedBlockingQueue<NodePortTuple>();
this.maintenanceQueue = new LinkedBlockingQueue<NodePortTuple>();
this.evHistTopologySwitch = new EventHistory<EventHistoryTopologySwitch>(EVENT_HISTORY_SIZE);
this.evHistTopologyLink = new EventHistory<EventHistoryTopologyLink>(EVENT_HISTORY_SIZE);
this.evHistTopologyCluster = new EventHistory<EventHistoryTopologyCluster>(EVENT_HISTORY_SIZE);
this.ignoreMACSet = Collections.newSetFromMap(
new ConcurrentHashMap<MACRange,Boolean>());
}
示例6: init
import net.floodlightcontroller.util.EventHistory; //导入依赖的package包/类
@Override
public
void
init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
storageSource = context.getServiceImpl(IStorageSourceService.class);
threadPool = context.getServiceImpl(IThreadPoolService.class);
restApi = context.getServiceImpl(IRestApiService.class);
// read our config options
Map<String, String> configOptions = context.getConfigParams(this);
try {
String histSize = configOptions.get("eventhistorysize");
if (histSize != null) {
EVENT_HISTORY_SIZE = Short.parseShort(histSize);
}
} catch (NumberFormatException e) {
log.warn("Error event history size, using default of {} seconds", EVENT_HISTORY_SIZE);
}
log.debug("Event history size set to {}", EVENT_HISTORY_SIZE);
// Set the autoportfast feature to false.
this.autoPortFastFeature = false;
// We create this here because there is no ordering guarantee
this.linkDiscoveryAware = new ArrayList<ILinkDiscoveryListener>();
this.lock = new ReentrantReadWriteLock();
this.updates = new LinkedBlockingQueue<LDUpdate>();
this.links = new HashMap<Link, LinkInfo>();
this.portLinks = new HashMap<NodePortTuple, Set<Link>>();
this.suppressLinkDiscovery = Collections.synchronizedSet(new HashSet<NodePortTuple>());
this.portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
this.switchLinks = new HashMap<Long, Set<Link>>();
this.quarantineQueue = new LinkedBlockingQueue<NodePortTuple>();
this.maintenanceQueue = new LinkedBlockingQueue<NodePortTuple>();
this.evHistTopologySwitch = new EventHistory<EventHistoryTopologySwitch>(EVENT_HISTORY_SIZE);
this.evHistTopologyLink = new EventHistory<EventHistoryTopologyLink>(EVENT_HISTORY_SIZE);
this.evHistTopologyCluster = new EventHistory<EventHistoryTopologyCluster>(EVENT_HISTORY_SIZE);
}