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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AddMetersBatchInput
adaptFlatBatchAddMeter(BatchPlanStep planStep, NodeRef node)
Adapt flat batch add meter.static RemoveMetersBatchInput
adaptFlatBatchRemoveMeter(BatchPlanStep planStep, NodeRef node)
Adapt flat batch remove meter.static UpdateMetersBatchInput
adaptFlatBatchUpdateMeter(BatchPlanStep planStep, NodeRef node)
Adapt flat batch update meter.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 forconvertBatchMeterResult(int)
with conversionListenableFuture
.
-
-
-
Method Detail
-
adaptFlatBatchAddMeter
public static AddMetersBatchInput adaptFlatBatchAddMeter(BatchPlanStep planStep, NodeRef node)
Adapt flat batch add meter.- Parameters:
planStep
- batch step containing changes of the same typenode
- pointer for RPC routing- Returns:
- input suitable for
.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 typenode
- pointer for RPC routing- Returns:
- input suitable for
.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 typenode
- 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 forconvertBatchMeterResult(int)
with conversionListenableFuture
.- 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
-
-