Package org.infinispan.interceptors.impl
Class ClusteringInterceptor.ClusteredGetAllFuture
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<Void>
-
- org.infinispan.interceptors.impl.ClusteringInterceptor.ClusteredGetAllFuture
-
- All Implemented Interfaces:
CompletionStage<Void>
,Future<Void>
- Enclosing class:
- ClusteringInterceptor
protected class ClusteringInterceptor.ClusteredGetAllFuture extends CompletableFuture<Void>
completeExceptionally(Throwable)
must be called from synchronized block since we must not complete the future (exceptionally) when we're accessing the context - if there was an exception and we would retry, the context could be accessed concurrently by dangling handlers and retry execution (that does not synchronize on the same future). When completeExceptionally executes before the other responses processing, the future will be marked as done and as soon as the other responses get into the synchronized block, these will check isDone and return. If the response is being processed in sync block, running completeExceptionally and the related callbacks will be blocked until we finish the processing.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
-
Field Summary
Fields Modifier and Type Field Description int
counter
-
Constructor Summary
Constructors Constructor Description ClusteredGetAllFuture(int counter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
completeExceptionally(Throwable ex)
-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, 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
-
-
-
-
Method Detail
-
completeExceptionally
public boolean completeExceptionally(Throwable ex)
- Overrides:
completeExceptionally
in classCompletableFuture<Void>
-
-