Class BarrierUtil


  • public final class BarrierUtil
    extends Object
    Provides barrier message chaining and factory methods.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>> chainBarrier​(com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>> input, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nodeRef, FlowCapableTransactionService transactionService, com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<T>,​org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>,​org.opendaylight.yangtools.yang.common.RpcResult<T>> compositeTransform)
      Chain a barrier message - regardless of previous result and use given Function to combine original result and barrier result.
      static SendBarrierInput createSendBarrierInput​(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nodeRef)
      Creates barrier input.
    • Method Detail

      • chainBarrier

        public static <T> com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>> chainBarrier​(com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<T>> input,
                                                                                                                                               org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nodeRef,
                                                                                                                                               FlowCapableTransactionService transactionService,
                                                                                                                                               com.google.common.base.Function<org.apache.commons.lang3.tuple.Pair<org.opendaylight.yangtools.yang.common.RpcResult<T>,​org.opendaylight.yangtools.yang.common.RpcResult<SendBarrierOutput>>,​org.opendaylight.yangtools.yang.common.RpcResult<T>> compositeTransform)
        Chain a barrier message - regardless of previous result and use given Function to combine original result and barrier result.
        Type Parameters:
        T - type of input future
        Parameters:
        input - future to chain barrier to
        nodeRef - target device
        transactionService - barrier service
        compositeTransform - composite transform
        Returns:
        future holding both results (input and of the barrier)