Package org.aksw.faraday_cage.engine
Class ThreadlocalInheritingCompletableFuture<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
org.aksw.faraday_cage.engine.ThreadlocalInheritingCompletableFuture<T>
- All Implemented Interfaces:
CompletionStage<T>,Future<T>
This custom future implementation enables inheritance of Threadlocal variables.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <U> CompletableFuture<U>completedFuture(U value)Returns a new CompletableFuture that is already completed with the given value.<U> CompletableFuture<U>Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedStage, completeExceptionally, completeOnTimeout, copy, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, 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
-
ThreadlocalInheritingCompletableFuture
public ThreadlocalInheritingCompletableFuture()
-
-
Method Details
-
completedFuture
Returns a new CompletableFuture that is already completed with the given value.- Type Parameters:
U- the type of the value- Parameters:
value- the value- Returns:
- the completed CompletableFuture
-
defaultExecutor
- Overrides:
defaultExecutorin classCompletableFuture<T>
-
newIncompleteFuture
- Overrides:
newIncompleteFuturein classCompletableFuture<T>
-