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.AsynchronousCompletionTask
-
Constructor Summary
ConstructorDescriptionCreates 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, failedFuture, failedStage, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, 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, ornull
to not do any deadlock checking
-
-
Method Details
-
get
- Specified by:
get
in interfaceFuture<T>
- Overrides:
get
in classCompletableFuture<T>
- Throws:
InterruptedException
ExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<T>
- Overrides:
get
in classCompletableFuture<T>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
join
- Overrides:
join
in classCompletableFuture<T>
-