Class CountableListener<T>

  • All Implemented Interfaces:
    io.netty.util.concurrent.FutureListener<Object>, io.netty.util.concurrent.GenericFutureListener<io.netty.util.concurrent.Future<Object>>, EventListener

    public class CountableListener<T>
    extends Object
    implements io.netty.util.concurrent.FutureListener<Object>
    Author:
    Nikita Koksharov
    • Field Detail

      • value

        protected final T value
    • Constructor Detail

      • CountableListener

        public CountableListener()
      • CountableListener

        public CountableListener​(RPromise<T> result,
                                 T value)
      • CountableListener

        public CountableListener​(RPromise<T> result,
                                 T value,
                                 int count)
    • Method Detail

      • setCounter

        public void setCounter​(int newValue)
      • decCounter

        public void decCounter()
      • operationComplete

        public void operationComplete​(io.netty.util.concurrent.Future<Object> future)
                               throws Exception
        Specified by:
        operationComplete in interface io.netty.util.concurrent.GenericFutureListener<T>
        Throws:
        Exception
      • onSuccess

        protected void onSuccess​(T value)