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 ThrowablepossibleCancellation(@Nullable Throwable currentThrowable) if the passed inThrowableis non-null then it is returned as id and if there is no exception then the cancellation state is checked inExecutionInput.isCancelled()and aAbortExecutionExceptionis made as the returnedThrowablevoidThis will abort the execution via throwingAbortExecutionExceptionif theExecutionInputhas been cancelledvoidupdateExecutionInput(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 throwingAbortExecutionExceptionif theExecutionInputhas been cancelled- Throws:
AbortExecutionException
-
possibleCancellation
if the passed inThrowableis non-null then it is returned as id and if there is no exception then the cancellation state is checked inExecutionInput.isCancelled()and aAbortExecutionExceptionis 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()
-