本文整理汇总了Java中org.onosproject.store.trivial.SimpleIntentStore类的典型用法代码示例。如果您正苦于以下问题:Java SimpleIntentStore类的具体用法?Java SimpleIntentStore怎么用?Java SimpleIntentStore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleIntentStore类属于org.onosproject.store.trivial包,在下文中一共展示了SimpleIntentStore类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.onosproject.store.trivial.SimpleIntentStore; //导入依赖的package包/类
@Before
public void setUp() {
service = new MockIntentService();
store = new SimpleIntentStore();
cleanup = new IntentCleanup();
idGenerator = new MockIdGenerator();
cleanup.cfgService = new ComponentConfigAdapter();
cleanup.service = service;
cleanup.store = store;
cleanup.period = 10;
cleanup.retryThreshold = 3;
cleanup.activate();
assertTrue("store should be empty",
Sets.newHashSet(cleanup.store.getIntents()).isEmpty());
Intent.bindIdGenerator(idGenerator);
}
示例2: setUp
import org.onosproject.store.trivial.SimpleIntentStore; //导入依赖的package包/类
@Before
public void setUp() {
manager = new IntentManager();
flowRuleService = new MockFlowRuleService();
manager.store = new SimpleIntentStore();
injectEventDispatcher(manager, new TestEventDispatcher());
manager.trackerService = new TestIntentTracker();
manager.flowRuleService = flowRuleService;
manager.coreService = new TestCoreManager();
manager.configService = mock(ComponentConfigService.class);
service = manager;
extensionService = manager;
manager.activate();
service.addListener(listener);
extensionService.registerCompiler(MockIntent.class, compiler);
assertTrue("store should be empty",
Sets.newHashSet(service.getIntents()).isEmpty());
assertEquals(0L, flowRuleService.getFlowRuleCount());
}
示例3: setUp
import org.onosproject.store.trivial.SimpleIntentStore; //导入依赖的package包/类
@Before
public void setUp() {
service = createMock(IntentService.class);
store = new SimpleIntentStore();
cleanup = new IntentCleanup();
idGenerator = new MockIdGenerator();
service.addListener(cleanup);
expectLastCall().once();
replay(service);
cleanup.cfgService = new ComponentConfigAdapter();
cleanup.service = service;
cleanup.store = store;
cleanup.period = 1000;
cleanup.retryThreshold = 3;
cleanup.activate();
verify(service);
reset(service);
assertTrue("store should be empty",
Sets.newHashSet(cleanup.store.getIntents()).isEmpty());
Intent.bindIdGenerator(idGenerator);
}
示例4: setUp
import org.onosproject.store.trivial.SimpleIntentStore; //导入依赖的package包/类
@Before
public void setUp() {
service = new MockIntentService();
store = new SimpleIntentStore();
cleanup = new IntentCleanup();
super.setUp();
cleanup.cfgService = new ComponentConfigAdapter();
cleanup.service = service;
cleanup.store = store;
cleanup.period = 10;
cleanup.retryThreshold = 3;
cleanup.activate();
assertTrue("store should be empty",
Sets.newHashSet(cleanup.store.getIntents()).isEmpty());
}
示例5: setUp
import org.onosproject.store.trivial.SimpleIntentStore; //导入依赖的package包/类
@Before
public void setUp() {
service = createMock(IntentService.class);
store = new SimpleIntentStore();
cleanup = new IntentCleanup();
cleanup.cfgService = new ComponentConfigAdapter();
cleanup.service = service;
cleanup.store = store;
cleanup.period = 1000;
cleanup.retryThreshold = 3;
assertTrue("store should be empty",
Sets.newHashSet(cleanup.store.getIntents()).isEmpty());
super.setUp();
}
示例6: setup
import org.onosproject.store.trivial.SimpleIntentStore; //导入依赖的package包/类
@Before
public void setup() {
super.setup();
flowRuleService = new TestFlowRuleService();
flowRuleServiceNonDisruptive = new TestFlowRuleServiceNonDisruptive();
installer = new FlowRuleIntentInstaller();
installer.flowRuleService = flowRuleService;
installer.store = new SimpleIntentStore();
installer.intentExtensionService = intentExtensionService;
installer.intentInstallCoordinator = intentInstallCoordinator;
installer.trackerService = trackerService;
installer.configService = mock(ComponentConfigService.class);
installer.activate();
}
示例7: setUp
import org.onosproject.store.trivial.SimpleIntentStore; //导入依赖的package包/类
@Before
public void setUp() {
manager = new IntentManager();
flowRuleService = new MockFlowRuleService();
manager.store = new SimpleIntentStore();
injectEventDispatcher(manager, new TestEventDispatcher());
manager.trackerService = trackerService;
manager.flowRuleService = flowRuleService;
manager.coreService = new TestCoreManager();
manager.configService = mock(ComponentConfigService.class);
service = manager;
extensionService = manager;
intentInstallCoordinator = manager;
manager.activate();
service.addListener(listener);
extensionService.registerCompiler(MockIntent.class, compiler);
installer = new TestIntentInstaller(extensionService, trackerService,
intentInstallCoordinator, flowRuleService);
extensionService.registerInstaller(MockInstallableIntent.class, installer);
assertTrue("store should be empty",
Sets.newHashSet(service.getIntents()).isEmpty());
assertEquals(0L, flowRuleService.getFlowRuleCount());
}