Class FlatBatchMeterAdapters

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

public final class FlatBatchMeterAdapters extends Object
Transform between FlatBatch API and meter batch API.
  • Method Details

    • adaptFlatBatchAddMeter

      public static AddMetersBatchInput adaptFlatBatchAddMeter(BatchPlanStep planStep, NodeRef node)
      Adapt flat batch add meter.
      Parameters:
      planStep - batch step containing changes of the same type
      node - pointer for RPC routing
      Returns:
      input suitable for
      invalid reference
      .opendaylight.meters.service.rev160316.SalMetersBatchService#addMetersBatch(AddMetersBatchInput)
    • adaptFlatBatchRemoveMeter

      public static RemoveMetersBatchInput adaptFlatBatchRemoveMeter(BatchPlanStep planStep, NodeRef node)
      Adapt flat batch remove meter.
      Parameters:
      planStep - batch step containing changes of the same type
      node - pointer for RPC routing
      Returns:
      input suitable for
      invalid reference
      .opendaylight.meters.service.rev160316.SalMetersBatchService#removeMetersBatch(RemoveMetersBatchInput)
    • adaptFlatBatchUpdateMeter

      public static UpdateMetersBatchInput adaptFlatBatchUpdateMeter(BatchPlanStep planStep, NodeRef node)
      Adapt flat batch update meter.
      Parameters:
      planStep - batch step containing changes of the same type
      node - pointer for RPC routing
      Returns:
      input suitable for
      invalid reference
      .opendaylight.meters.service.rev160316.SalMetersBatchService#updateMetersBatch(UpdateMetersBatchInput)
    • convertMeterBatchFutureForChain

      public static <T extends BatchMeterOutputListGrouping> com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<ProcessFlatBatchOutput>> convertMeterBatchFutureForChain(com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>> resultUpdateMeterFuture, int currentOffset)
      Shortcut for convertBatchMeterResult(int) with conversion ListenableFuture.
      Type Parameters:
      T - exact type of batch flow output
      Parameters:
      resultUpdateMeterFuture - batch group 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