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>
public class ThreadlocalInheritingCompletableFuture<T> extends CompletableFuture<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 Constructor Description ThreadlocalInheritingCompletableFuture()
-
Method Summary
Modifier and Type Method Description static <U> CompletableFuture<U>completedFuture(U value)Returns a new CompletableFuture that is already completed with the given value.ExecutordefaultExecutor()<U> CompletableFuture<U>newIncompleteFuture()-
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, 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
-
-
-
-
Method Detail
-
completedFuture
public static <U> CompletableFuture<U> completedFuture(U value)
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
public Executor defaultExecutor()
- Overrides:
defaultExecutorin classCompletableFuture<T>
-
newIncompleteFuture
public <U> CompletableFuture<U> newIncompleteFuture()
- Overrides:
newIncompleteFuturein classCompletableFuture<T>
-
-