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


Java EventType类代码示例

本文整理汇总了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());
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:22,代码来源:DebugEventTest.java

示例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;
    }
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:17,代码来源:FlowReconcileQuery.java

示例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();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:DeviceManagerImpl.java

示例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();

}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:12,代码来源:DebugEventAppender.java

示例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();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:LinkDiscoveryManager.java

示例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();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:13,代码来源:TopologyManager.java

示例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();
    }

}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:13,代码来源:DebugEventAppender.java


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