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.
      • awaitUninterruptibly

        RPromise<T> awaitUninterruptibly()
        Description copied from interface: RFuture
        Use snippet below instead.
                     try {
                         rFuture.toCompletableFuture().join();
                     } catch (Exception e) {
                         // skip
                     }
         
        Specified by:
        awaitUninterruptibly in interface RFuture<T>
        Returns:
        Future object
      • syncUninterruptibly

        RPromise<T> syncUninterruptibly()
        Description copied from interface: RFuture
        Use toCompletableFuture().join() method instead
        Specified by:
        syncUninterruptibly in interface RFuture<T>
        Returns:
        Future object
      • hasListeners

        boolean hasListeners()