Class FlatBatchFlowAdapters

java.lang.Object
org.opendaylight.openflowplugin.impl.services.batch.FlatBatchFlowAdapters

public final class FlatBatchFlowAdapters extends Object
Transform between FlatBatch API and flow batch API.
  • Method Details

    • adaptFlatBatchAddFlow

      public static AddFlowsBatchInput adaptFlatBatchAddFlow(BatchPlanStep planStep, NodeRef node)
      Adapt flat batch add flow.
      Parameters:
      planStep - batch step containing changes of the same type
      node - pointer for RPC routing
      Returns:
      input suitable for
      invalid reference
      .opendaylight.flows.service.rev160314.SalFlowsBatchService#addFlowsBatch(AddFlowsBatchInput)
    • adaptFlatBatchRemoveFlow

      public static RemoveFlowsBatchInput adaptFlatBatchRemoveFlow(BatchPlanStep planStep, NodeRef node)
      Adapt flat batch remove flow.
      Parameters:
      planStep - batch step containing changes of the same type
      node - pointer for RPC routing
      Returns:
      input suitable for
      invalid reference
      .opendaylight.flows.service.rev160314.SalFlowsBatchService#removeFlowsBatch(RemoveFlowsBatchInput)
    • adaptFlatBatchUpdateFlow

      public static UpdateFlowsBatchInput adaptFlatBatchUpdateFlow(BatchPlanStep planStep, NodeRef node)
      Adapt flat batch update flow.
      Parameters:
      planStep - batch step containing changes of the same type
      node - pointer for RPC routing
      Returns:
      input suitable for
      invalid reference
      .opendaylight.flows.service.rev160314.SalFlowsBatchService#updateFlowsBatch(UpdateFlowsBatchInput)
    • convertFlowBatchFutureForChain

      public static <T extends BatchFlowOutputListGrouping> com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<ProcessFlatBatchOutput>> convertFlowBatchFutureForChain(com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>> resultUpdateFlowFuture, int currentOffset)
      Shortcut for convertBatchFlowResult(int) with conversion ListenableFuture.
      Type Parameters:
      T - exact type of batch flow output
      Parameters:
      resultUpdateFlowFuture - batch flow rpc-result (add/remove/update)
      currentOffset - offset of current batch plan step with respect to entire chain of steps
      Returns:
      ListenableFuture with converted result ProcessFlatBatchOutput