本文整理匯總了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());
}