Class FlatBatchMeterAdapters


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

      • adaptFlatBatchAddMeter

        public static AddMetersBatchInput adaptFlatBatchAddMeter​(BatchPlanStep planStep,
                                                                 org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.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 .opendaylight.meters.service.rev160316.SalMetersBatchService#addMetersBatch(AddMetersBatchInput)
      • adaptFlatBatchRemoveMeter

        public static RemoveMetersBatchInput adaptFlatBatchRemoveMeter​(BatchPlanStep planStep,
                                                                       org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.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 .opendaylight.meters.service.rev160316.SalMetersBatchService#removeMetersBatch(RemoveMetersBatchInput)
      • adaptFlatBatchUpdateMeter

        public static UpdateMetersBatchInput adaptFlatBatchUpdateMeter​(BatchPlanStep planStep,
                                                                       org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.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 .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