本文整理汇总了Java中org.onosproject.net.flowobjective.FlowObjectiveStoreDelegate类的典型用法代码示例。如果您正苦于以下问题:Java FlowObjectiveStoreDelegate类的具体用法?Java FlowObjectiveStoreDelegate怎么用?Java FlowObjectiveStoreDelegate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FlowObjectiveStoreDelegate类属于org.onosproject.net.flowobjective包,在下文中一共展示了FlowObjectiveStoreDelegate类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pendingForwardingObjective
import org.onosproject.net.flowobjective.FlowObjectiveStoreDelegate; //导入依赖的package包/类
/**
* Tests adding a pending forwarding objective.
*
* @throws TestUtilsException if lookup of a field fails
*/
@Test
public void pendingForwardingObjective() throws TestUtilsException {
TrafficSelector selector = DefaultTrafficSelector.emptySelector();
TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
ForwardingObjective forward4 =
DefaultForwardingObjective.builder()
.fromApp(NetTestTools.APP_ID)
.withFlag(ForwardingObjective.Flag.SPECIFIC)
.withSelector(selector)
.withTreatment(treatment)
.makePermanent()
.nextStep(4)
.add();
ForwardingObjective forward5 =
DefaultForwardingObjective.builder()
.fromApp(NetTestTools.APP_ID)
.withFlag(ForwardingObjective.Flag.SPECIFIC)
.withSelector(selector)
.withTreatment(treatment)
.makePermanent()
.nextStep(5)
.add();
// multiple pending forwards should be combined
manager.forward(id1, forward4);
manager.forward(id1, forward4);
manager.forward(id1, forward5);
// 1 should be complete, 1 pending
TestTools.assertAfter(RETRY_MS, () ->
assertThat(forwardingObjectives, hasSize(1)));
assertThat(forwardingObjectives, hasItem("of:d1"));
assertThat(filteringObjectives, hasSize(0));
assertThat(nextObjectives, hasSize(0));
// Now send events to trigger the objective still in the queue
ObjectiveEvent event1 = new ObjectiveEvent(ObjectiveEvent.Type.ADD, 4);
FlowObjectiveStoreDelegate delegate = TestUtils.getField(manager, "delegate");
delegate.notify(event1);
// all should be processed now
TestTools.assertAfter(RETRY_MS, () ->
assertThat(forwardingObjectives, hasSize(2)));
assertThat(forwardingObjectives, hasItem("of:d1"));
assertThat(filteringObjectives, hasSize(0));
assertThat(nextObjectives, hasSize(0));
}
示例2: setDelegate
import org.onosproject.net.flowobjective.FlowObjectiveStoreDelegate; //导入依赖的package包/类
@Override
public void setDelegate(FlowObjectiveStoreDelegate delegate) {
virtualFlowObjectiveStore.setDelegate(networkId(), delegate);
}
示例3: unsetDelegate
import org.onosproject.net.flowobjective.FlowObjectiveStoreDelegate; //导入依赖的package包/类
@Override
public void unsetDelegate(FlowObjectiveStoreDelegate delegate) {
virtualFlowObjectiveStore.unsetDelegate(networkId(), delegate);
}
示例4: setDelegate
import org.onosproject.net.flowobjective.FlowObjectiveStoreDelegate; //导入依赖的package包/类
@Override
public void setDelegate(FlowObjectiveStoreDelegate delegate) {
}
示例5: unsetDelegate
import org.onosproject.net.flowobjective.FlowObjectiveStoreDelegate; //导入依赖的package包/类
@Override
public void unsetDelegate(FlowObjectiveStoreDelegate delegate) {
}