Package io.deephaven.util
Interface CompletionStageFuture.Resolver<T>
- Enclosing interface:
- CompletionStageFuture<T>
public static interface CompletionStageFuture.Resolver<T>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
If not already completed, sets the value returned byFuture.get()
and related methods to the given value.boolean
completeExceptionally
(@NotNull Throwable ex) If not already completed, causes invocations ofFuture.get()
and related methods to throw the given exception wrapped in anExecutionException
.
-
Method Details
-
complete
If not already completed, sets the value returned byFuture.get()
and related methods to the given value.- Parameters:
value
- the result value- Returns:
true
if this invocation caused this CompletionStageFuture to transition to a completed state, elsefalse
- See Also:
-
completeExceptionally
If not already completed, causes invocations ofFuture.get()
and related methods to throw the given exception wrapped in anExecutionException
.- Parameters:
ex
- the exception- Returns:
true
if this invocation caused this CompletionStageFuture to transition to a completed state, elsefalse
- See Also:
-
getFuture
CompletionStageFuture<T> getFuture()- Returns:
- the underlying future to provide to the recipient; implementations must ensure that this method always returns an identical result for a given Resolver instance
-