本文整理汇总了Java中net.floodlightcontroller.debugevent.IDebugEventService.EventType类的典型用法代码示例。如果您正苦于以下问题:Java EventType类的具体用法?Java EventType怎么用?Java EventType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EventType类属于net.floodlightcontroller.debugevent.IDebugEventService包,在下文中一共展示了EventType类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testAckEvent
import net.floodlightcontroller.debugevent.IDebugEventService.EventType; //导入依赖的package包/类
@Test
public void testAckEvent() throws Exception{
IEventCategory<IntEvent> ev = null;
ev = debugEvent.buildEvent(IntEvent.class)
.setModuleName("test")
.setEventName("ack")
.setEventDescription("just a test")
.setEventType(EventType.ALWAYS_LOG)
.setBufferCapacity(20)
.setAckable(false)
.register();
//create a single event
IntEvent e = new IntEvent(10);
ev.newEventWithFlush(e);
EventInfoResource dei = debugEvent.getSingleEventHistory("test","ack", 1);
debugEvent.setAck(dei.getEventId(),
dei.getEvents().get(0).getEventInstanceId(),
true);
dei = debugEvent.getSingleEventHistory("test","ack", 1);
assertTrue(dei.getEvents().get(0).isAcked());
}
示例2: registerDebugEvent
import net.floodlightcontroller.debugevent.IDebugEventService.EventType; //导入依赖的package包/类
public void registerDebugEvent(String packageName,
IDebugEventService debugEvents)
throws MaxEventsRegistered {
try {
evReconcileQueryDebugEvent =
debugEvents.registerEvent(
packageName,
this.toString().toLowerCase().replace("_", "-"),
this.getDescription(),
EventType.ALWAYS_LOG,
FlowReconcileQueryDebugEvent.class,
500);
} catch (MaxEventsRegistered e) {
throw e;
}
}
示例3: registerDeviceManagerDebugEvents
import net.floodlightcontroller.debugevent.IDebugEventService.EventType; //导入依赖的package包/类
private void registerDeviceManagerDebugEvents() throws FloodlightModuleException {
if (debugEventService == null) {
logger.error("debugEventService should not be null");
}
EventCategoryBuilder<DeviceEvent> ecb = debugEventService.buildEvent(DeviceEvent.class);
debugEventCategory = ecb.setModuleName(PACKAGE)
.setEventName("hostevent")
.setEventDescription("Host added, removed, updated, or moved")
.setEventType(EventType.ALWAYS_LOG)
.setBufferCapacity(500)
.setAckable(false)
.register();
}
示例4: registerDebugEventQueue
import net.floodlightcontroller.debugevent.IDebugEventService.EventType; //导入依赖的package包/类
private static void registerDebugEventQueue() {
evWarnError = debugEvent.buildEvent(WarnErrorEvent.class)
.setModuleName("net.floodlightcontroller.core")
.setEventName("warn-error-queue")
.setEventDescription("all WARN and ERROR logs")
.setEventType(EventType.ALWAYS_LOG)
.setBufferCapacity(100)
.setAckable(false)
.register();
}
示例5: registerLinkDiscoveryDebugEvents
import net.floodlightcontroller.debugevent.IDebugEventService.EventType; //导入依赖的package包/类
private void registerLinkDiscoveryDebugEvents() throws FloodlightModuleException {
if (debugEventService == null) {
log.error("Debug Event Service not found.");
}
eventCategory = debugEventService.buildEvent(DirectLinkEvent.class)
.setModuleName(PACKAGE)
.setEventName("linkevent")
.setEventDescription("Direct OpenFlow links discovered or timed-out")
.setEventType(EventType.ALWAYS_LOG)
.setBufferCapacity(100)
.register();
}
示例6: registerTopologyDebugEvents
import net.floodlightcontroller.debugevent.IDebugEventService.EventType; //导入依赖的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();
}
示例7: registerDebugEventQueue
import net.floodlightcontroller.debugevent.IDebugEventService.EventType; //导入依赖的package包/类
private static void registerDebugEventQueue() {
try {
evWarnError = debugEvent.registerEvent("net.floodlightcontroller.core",
"warn-error-queue",
"all WARN and ERROR logs",
EventType.ALWAYS_LOG, WarnErrorEvent.class,
100);
} catch (MaxEventsRegistered e) {
e.printStackTrace();
}
}