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:
java.util.concurrent.CompletionStage<T>,java.util.concurrent.Future<T>
public class ThreadlocalInheritingCompletableFuture<T> extends java.util.concurrent.CompletableFuture<T>This custom future implementation enables inheritance of Threadlocal variables.
-
-
Constructor Summary
Constructors Constructor Description ThreadlocalInheritingCompletableFuture()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <U> java.util.concurrent.CompletableFuture<U>completedFuture(U value)Returns a new CompletableFuture that is already completed with the given value.java.util.concurrent.ExecutordefaultExecutor()<U> java.util.concurrent.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> java.util.concurrent.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 java.util.concurrent.Executor defaultExecutor()
- Overrides:
defaultExecutorin classjava.util.concurrent.CompletableFuture<T>
-
newIncompleteFuture
public <U> java.util.concurrent.CompletableFuture<U> newIncompleteFuture()
- Overrides:
newIncompleteFuturein classjava.util.concurrent.CompletableFuture<T>
-
-