Interface RFuture<V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      RFuture<V> await()
      Waits for this future to be completed.
      boolean await​(long timeoutMillis)
      Waits for this future to be completed within the specified time limit.
      boolean await​(long timeout,  unit)
      Waits for this future to be completed within the specified time limit.
      RFuture<V> awaitUninterruptibly()
      Waits for this future to be completed without interruption.
      boolean awaitUninterruptibly​(long timeoutMillis)
      Waits for this future to be completed within the specified time limit without interruption.
      boolean awaitUninterruptibly​(long timeout,  unit)
      Waits for this future to be completed within the specified time limit without interruption.
      cause()
      Returns the cause of the failed I/O operation if the I/O operation has failed.
      V getNow()
      Return the result without blocking.
      boolean isSuccess()
      Returns true if and only if the I/O operation was completed successfully.
      V join()
      Returns the result value when complete, or throws an (unchecked) exception if completed exceptionally.
      void <? super > action)  
      RFuture<V> sync()
      Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
      RFuture<V> syncUninterruptibly()
      Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
      • Methods inherited from interface java.util.concurrent.

        , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
      • Methods inherited from interface java.util.concurrent.

        , , , ,
    • 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

         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 and not relay on the returned null value.
        Returns:
        object
      • join

        V join()
        Returns the result value when complete, or throws an (unchecked) exception if completed exceptionally. To better conform with the use of common functional forms, if a computation involved in the completion of this CompletableFuture threw an exception.
        Returns:
        the result value
      • await

        boolean await​(long timeout,
                       unit)
               throws 
        Waits for this future to be completed within the specified time limit.
        Parameters:
        timeout - - wait timeout
        unit - - time unit
        Returns:
        true if and only if the future was completed within the specified time limit
        Throws:
        - if the current thread was interrupted
      • await

        boolean await​(long timeoutMillis)
               throws 
        Waits for this future to be completed within the specified time limit.
        Parameters:
        timeoutMillis - - timeout value
        Returns:
        true if and only if the future was completed within the specified time limit
        Throws:
        - if the current thread was interrupted
      • sync

        RFuture<V> sync()
                 throws 
        Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
        Returns:
        Future object
        Throws:
        - if the current thread was interrupted
      • syncUninterruptibly

        RFuture<V> syncUninterruptibly()
        Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
        Returns:
        Future object
      • await

        RFuture<V> await()
                  throws 
        Waits for this future to be completed.
        Returns:
        Future object
        Throws:
        - if the current thread was interrupted
      • awaitUninterruptibly

        RFuture<V> awaitUninterruptibly()
        Waits for this future to be completed without interruption. This method catches an and discards it silently.
        Returns:
        Future object
      • awaitUninterruptibly

        boolean awaitUninterruptibly​(long timeout,
                                      unit)
        Waits for this future to be completed within the specified time limit without interruption. This method catches an and discards it silently.
        Parameters:
        timeout - - timeout value
        unit - - timeout unit value
        Returns:
        true if and only if the future was completed within the specified time limit
      • awaitUninterruptibly

        boolean awaitUninterruptibly​(long timeoutMillis)
        Waits for this future to be completed within the specified time limit without interruption. This method catches an and discards it silently.
        Parameters:
        timeoutMillis - - timeout value
        Returns:
        true if and only if the future was completed within the specified time limit
      • onComplete

        void onComplete​(<? super > action)