Interface InternalStateFuture<T>

    • Method Detail

      • isDone

        boolean isDone()
        Returns true if completed in any fashion: normally, exceptionally, or via cancellation.
        Returns:
        true if completed
      • get

        T get()
        Waits if necessary for the computation to complete, and then retrieves its result.
      • complete

        void complete​(T result)
        Complete this future.
      • completeExceptionally

        void completeExceptionally​(String message,
                                   Throwable ex)
        Fail this future and pass the given exception to the runtime.
        Parameters:
        message - the description of this exception
        ex - the exception
      • thenSyncAccept

        void thenSyncAccept​(ThrowingConsumer<? super T,​? extends Exception> action)
        Accept the action in the same thread with the one of complete (or current thread if it has been completed).
        Parameters:
        action - the action to perform.