当前位置: 首页>>代码示例>>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;未经允许,请勿转载。