當前位置: 首頁>>代碼示例>>Java>>正文


Java SimpleIntentStore類代碼示例

本文整理匯總了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);
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:20,代碼來源:IntentCleanupTest.java

示例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());
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:22,代碼來源:IntentManagerTest.java

示例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);
}
 
開發者ID:shlee89,項目名稱:athena,代碼行數:27,代碼來源:IntentCleanupTestMock.java

示例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());
}
 
開發者ID:opennetworkinglab,項目名稱:onos,代碼行數:19,代碼來源:IntentCleanupTest.java

示例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();
}
 
開發者ID:opennetworkinglab,項目名稱:onos,代碼行數:18,代碼來源:IntentCleanupTestMock.java

示例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();
}
 
開發者ID:opennetworkinglab,項目名稱:onos,代碼行數:16,代碼來源:FlowRuleIntentInstallerTest.java

示例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());
}
 
開發者ID:opennetworkinglab,項目名稱:onos,代碼行數:29,代碼來源:IntentManagerTest.java


注:本文中的org.onosproject.store.trivial.SimpleIntentStore類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。