Class DeadlockDetectingCompletableFuture<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
com.vaadin.flow.component.internal.DeadlockDetectingCompletableFuture<T>
- All Implemented Interfaces:
CompletionStage<T>,Future<T>
A completable future that will throw from blocking operations if the current
thread holds the session lock.
This is used for pending JS results because a response providing the value cannot be processed while the session is locked.
Throwing is unfortunately only practical for this immediate instance, but
there isn't any sensible way of also intercepting for instances derived using
e.g. thenAccept.
For internal use only. May be renamed or removed in a future release.
- Since:
- 2.1.4
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new deadlock detecting completable future tied to the given session. -
Method Summary
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, state, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
Constructor Details
-
DeadlockDetectingCompletableFuture
Creates a new deadlock detecting completable future tied to the given session.- Parameters:
session- the session to use, ornullto not do any deadlock checking
-
-
Method Details
-
get
- Specified by:
getin interfaceFuture<T>- Overrides:
getin classCompletableFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<T>- Overrides:
getin classCompletableFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
join
- Overrides:
joinin classCompletableFuture<T>
-