Interface RPromise<T>

    • Method Detail

      • trySuccess

        boolean trySuccess​(T result)
        Marks this future as a success and notifies all listeners.
        Parameters:
        result - object
        Returns:
        true if and only if successfully marked this future as a success. Otherwise false because this future is already marked as either a success or a failure.
      • tryFailure

        boolean tryFailure​(Throwable cause)
        Marks this future as a failure and notifies all listeners.
        Parameters:
        cause - object
        Returns:
        true if and only if successfully marked this future as a failure. Otherwise false because this future is already marked as either a success or a failure.
      • setUncancellable

        boolean setUncancellable()
        Make this future impossible to cancel.
        Returns:
        true if and only if successfully marked this future as uncancellable or it is already done without being cancelled. false if this future has been cancelled already.
      • addListener

        RPromise<T> addListener​(io.netty.util.concurrent.FutureListener<? super T> listener)
        Description copied from interface: RFuture
        Use methods from CompletionStage interface
        Specified by:
        addListener in interface RFuture<T>
        Parameters:
        listener - - listener for future object
        Returns:
        Future object
      • addListeners

        RPromise<T> addListeners​(io.netty.util.concurrent.FutureListener<? super T>... listeners)
        Description copied from interface: RFuture
        Use methods from CompletionStage interface
        Specified by:
        addListeners in interface RFuture<T>
        Parameters:
        listeners - - listeners for future object
        Returns:
        Future object
      • removeListener

        RPromise<T> removeListener​(io.netty.util.concurrent.FutureListener<? super T> listener)
        Specified by:
        removeListener in interface RFuture<T>
      • removeListeners

        RPromise<T> removeListeners​(io.netty.util.concurrent.FutureListener<? super T>... listeners)
        Specified by:
        removeListeners in interface RFuture<T>
      • syncUninterruptibly

        RPromise<T> syncUninterruptibly()
        Description copied from interface: RFuture
        Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
        Specified by:
        syncUninterruptibly in interface RFuture<T>
        Returns:
        Future object
      • hasListeners

        boolean hasListeners()