Class FlowUtil
java.lang.Object
org.opendaylight.openflowplugin.impl.util.FlowUtil
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.google.common.base.Function
<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<AddFlowsBatchOutput>, org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>, org.opendaylight.yangtools.yang.common.RpcResult<AddFlowsBatchOutput>> Attach barrier response to givenRpcResult
<AddFlowsBatchOutput>.static final com.google.common.base.Function
<org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>, org.opendaylight.yangtools.yang.common.RpcResult<AddFlowsBatchOutput>> Gather errors into collection and wrap it intoRpcResult
and propagate allRpcError
.static final com.google.common.base.Function
<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowsBatchOutput>, org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>, org.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowsBatchOutput>> Attach barrier response to givenRpcResult
<RemoveFlowsBatchOutput>.static final com.google.common.base.Function
<org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>, org.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowsBatchOutput>> Gather errors into collection and wrap it intoRpcResult
and propagate allRpcError
.static final com.google.common.base.Function
<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<UpdateFlowsBatchOutput>, org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>, org.opendaylight.yangtools.yang.common.RpcResult<UpdateFlowsBatchOutput>> Attach barrier response to givenRpcResult
<UpdateFlowsBatchOutput>.static final com.google.common.base.Function
<org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>, org.opendaylight.yangtools.yang.common.RpcResult<UpdateFlowsBatchOutput>> Gather errors into collection and wrap it intoRpcResult
and propagate allRpcError
. -
Method Summary
Modifier and TypeMethodDescriptionstatic FlowRef
buildFlowPath
(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Node> nodePath, org.opendaylight.yangtools.yang.common.Uint8 tableId, FlowId flowId) Build flow path flow ref.static <O> com.google.common.base.Function
<List<org.opendaylight.yangtools.yang.common.RpcResult<O>>, org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>> createCumulatingFunction
(Collection<? extends BatchFlowIdGrouping> inputBatchFlows) Factory method: createsFunction
which keeps info of original inputs (passed to flow-rpc) and processes list of all flow-rpc results.
-
Field Details
-
FLOW_REMOVE_COMPOSING_TRANSFORM
public static final com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowsBatchOutput>,org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>, FLOW_REMOVE_COMPOSING_TRANSFORMorg.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowsBatchOutput>> Attach barrier response to givenRpcResult
<RemoveFlowsBatchOutput>. -
FLOW_ADD_COMPOSING_TRANSFORM
public static final com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<AddFlowsBatchOutput>,org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>, FLOW_ADD_COMPOSING_TRANSFORMorg.opendaylight.yangtools.yang.common.RpcResult<AddFlowsBatchOutput>> Attach barrier response to givenRpcResult
<AddFlowsBatchOutput>. -
FLOW_UPDATE_COMPOSING_TRANSFORM
public static final com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<UpdateFlowsBatchOutput>,org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>, FLOW_UPDATE_COMPOSING_TRANSFORMorg.opendaylight.yangtools.yang.common.RpcResult<UpdateFlowsBatchOutput>> Attach barrier response to givenRpcResult
<UpdateFlowsBatchOutput>. -
FLOW_REMOVE_TRANSFORM
public static final com.google.common.base.Function<org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>,org.opendaylight.yangtools.yang.common.RpcResult<RemoveFlowsBatchOutput>> FLOW_REMOVE_TRANSFORMGather errors into collection and wrap it intoRpcResult
and propagate allRpcError
. -
FLOW_ADD_TRANSFORM
public static final com.google.common.base.Function<org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>,org.opendaylight.yangtools.yang.common.RpcResult<AddFlowsBatchOutput>> FLOW_ADD_TRANSFORMGather errors into collection and wrap it intoRpcResult
and propagate allRpcError
. -
FLOW_UPDATE_TRANSFORM
public static final com.google.common.base.Function<org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>,org.opendaylight.yangtools.yang.common.RpcResult<UpdateFlowsBatchOutput>> FLOW_UPDATE_TRANSFORMGather errors into collection and wrap it intoRpcResult
and propagate allRpcError
.
-
-
Method Details
-
buildFlowPath
public static FlowRef buildFlowPath(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Node> nodePath, org.opendaylight.yangtools.yang.common.Uint8 tableId, FlowId flowId) Build flow path flow ref. -
createCumulatingFunction
public static <O> com.google.common.base.Function<List<org.opendaylight.yangtools.yang.common.RpcResult<O>>,org.opendaylight.yangtools.yang.common.RpcResult<List<BatchFailedFlowsOutput>>> createCumulatingFunction(Collection<? extends BatchFlowIdGrouping> inputBatchFlows) Factory method: createsFunction
which keeps info of original inputs (passed to flow-rpc) and processes list of all flow-rpc results.- Type Parameters:
O
- result container type- Parameters:
inputBatchFlows
- collection of problematic flow-ids wrapped in container of given type <O>- Returns:
- static reusable function
-