Package graphql
Class EngineRunningState
java.lang.Object
graphql.EngineRunningState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<U,
T> CompletableFuture <U> compose
(CompletableFuture<T> src, Function<? super T, ? extends CompletionStage<U>> fn) engineRun
(Supplier<CompletableFuture<ExecutionResult>> engineRun) Only used once outside of this class: when the execution starts<U,
T> CompletableFuture <U> handle
(CompletableFuture<T> src, BiFunction<? super T, Throwable, ? extends U> fn) @Nullable AbortExecutionException
@Nullable Throwable
possibleCancellation
(@Nullable Throwable currentThrowable) if the passed inThrowable
is non-null then it is returned as id and if there is no exception then the cancellation state is checked inExecutionInput.isCancelled()
and aAbortExecutionException
is made as the returnedThrowable
void
This will abort the execution via throwingAbortExecutionException
if theExecutionInput
has been cancelledvoid
updateExecutionInput
(ExecutionInput executionInput) <T> CompletableFuture
<T> whenComplete
(CompletableFuture<T> src, BiConsumer<? super T, ? super Throwable> fn)
-
Constructor Details
-
EngineRunningState
-
-
Method Details
-
handle
public <U,T> CompletableFuture<U> handle(CompletableFuture<T> src, BiFunction<? super T, Throwable, ? extends U> fn) -
whenComplete
public <T> CompletableFuture<T> whenComplete(CompletableFuture<T> src, BiConsumer<? super T, ? super Throwable> fn) -
compose
public <U,T> CompletableFuture<U> compose(CompletableFuture<T> src, Function<? super T, ? extends CompletionStage<U>> fn) -
updateExecutionInput
-
engineRun
public CompletableFuture<ExecutionResult> engineRun(Supplier<CompletableFuture<ExecutionResult>> engineRun) Only used once outside of this class: when the execution starts -
throwIfCancelled
This will abort the execution via throwingAbortExecutionException
if theExecutionInput
has been cancelled- Throws:
AbortExecutionException
-
possibleCancellation
if the passed inThrowable
is non-null then it is returned as id and if there is no exception then the cancellation state is checked inExecutionInput.isCancelled()
and aAbortExecutionException
is made as the returnedThrowable
- Parameters:
currentThrowable
- the current exception state- Returns:
- a current throwable or a cancellation exception or null if none are in error
-
ifCancelledMakeException
- Returns:
- a AbortExecutionException if the current operation has been cancelled via
ExecutionInput.cancel()
-