Interface RFuture<V>

    • Method Detail

      • isSuccess

        boolean isSuccess()
        Returns true if and only if the I/O operation was completed successfully.
        Returns:
        true if future was completed successfully
      • cause

        Throwable cause()
        Returns the cause of the failed I/O operation if the I/O operation has failed.
        Returns:
        the cause of the failure. null if succeeded or this future is not completed yet.
      • getNow

        V getNow()
        Return the result without blocking. If the future is not done yet this will return null. As it is possible that a null value is used to mark the future as successful you also need to check if the future is really done with Future.isDone() and not relay on the returned null value.
        Returns:
        object
      • join

        @Deprecated
        V join()
        Deprecated.
        Use toCompletableFuture().join() method instead
        Returns:
        the result value
      • await

        @Deprecated
        boolean await​(long timeout,
                      TimeUnit unit)
               throws InterruptedException
        Deprecated.
        Use snippet below instead.
                         try {
                             toCompletableFuture().get();
                         } catch (Exception e) {
                             // skip
                         }
         
        Parameters:
        timeout - - wait timeout
        unit - - time unit
        Returns:
        true if and only if the future was completed within the specified time limit
        Throws:
        InterruptedException - if the current thread was interrupted
      • await

        @Deprecated
        boolean await​(long timeoutMillis)
               throws InterruptedException
        Deprecated.
        Use snippet below instead.
                         try {
                             toCompletableFuture().get();
                         } catch (Exception e) {
                             // skip
                         }
         
        Parameters:
        timeoutMillis - - timeout value
        Returns:
        true if and only if the future was completed within the specified time limit
        Throws:
        InterruptedException - if the current thread was interrupted
      • syncUninterruptibly

        @Deprecated
        RFuture<V> syncUninterruptibly()
        Deprecated.
        Use toCompletableFuture().join() method instead
        Returns:
        Future object
      • awaitUninterruptibly

        @Deprecated
        RFuture<V> awaitUninterruptibly()
        Deprecated.
        Use snippet below instead.
                     try {
                         rFuture.toCompletableFuture().join();
                     } catch (Exception e) {
                         // skip
                     }
         
        Returns:
        Future object
      • awaitUninterruptibly

        @Deprecated
        boolean awaitUninterruptibly​(long timeout,
                                     TimeUnit unit)
        Deprecated.
        Use snippet below instead.
                         try {
                             toCompletableFuture().get();
                         } catch (Exception e) {
                             // skip
                         }
         
        Parameters:
        timeout - - timeout value
        unit - - timeout unit value
        Returns:
        true if and only if the future was completed within the specified time limit
      • awaitUninterruptibly

        @Deprecated
        boolean awaitUninterruptibly​(long timeoutMillis)
        Deprecated.
        Use snippet below instead.
                         try {
                             toCompletableFuture().get();
                         } catch (Exception e) {
                             // skip
                         }
         
        Parameters:
        timeoutMillis - - timeout value
        Returns:
        true if and only if the future was completed within the specified time limit
      • onComplete

        @Deprecated
        void onComplete​(BiConsumer<? super V,​? super Throwable> action)
        Deprecated.
        Use whenComplete() method instead
        Parameters:
        action - - callback