Class ConditionFuture<T>

    • Method Detail

      • newConditionStage

        public CompletionStage<Void> newConditionStage​(Predicate<T> test,
                                                       Supplier<Exception> exceptionGenerator,
                                                       long timeout,
                                                       TimeUnit timeUnit)
        Create a new CompletionStage that completes after the first update(Object) call with a value satisfying the test predicate.
        Parameters:
        test - The predicate.
        exceptionGenerator - Exception generator for timeout errors.
        timeout - Maximum time to wait for a value satisfying the predicate.
        timeUnit - Timeout time unit.
      • update

        public void update​(T value)
        Update the value and complete any outstanding condition stages for which the value satisfies the predicate.
      • updateAsync

        public void updateAsync​(T value,
                                Executor executor)
        Update the value and complete any outstanding condition stages for which the value satisfies the predicate.
      • stop

        public void stop()