Class FutureAdapter<T,s>
java.lang.Object
org.springframework.util.concurrent.FutureAdapter<T,s>
- Type Parameters:
T- the type of thisFutures- the type of the adaptee'sFuture
- All Implemented Interfaces:
Future<T>
@Deprecated(since="6.0")
public abstract class FutureAdapter<T,s>
extends Object
implements Future<T>
Deprecated.
as of 6.0, with no concrete replacement
Abstract class that adapts a
Future parameterized over s into a Future
parameterized over T. All methods are delegated to the adaptee, where get()
and get(long, TimeUnit) call adapt(Object) on the adaptee's result.- since:
- 4.0
- Author:
- Arjen Poutsma
-
Constructor summary
ConstructorsModifierConstructorDescriptionprotectedFutureAdapter(Future<s> adaptee) Deprecated.Constructs a newFutureAdapterwith the given adaptee. -
Method summary
Modifier and TypeMethodDescriptionDeprecated.Adapts the given adaptee's result into T.booleancancel(boolean mayInterruptIfRunning) Deprecated. get()Deprecated. Deprecated. Deprecated.Returns the adaptee.booleanDeprecated. booleanisDone()Deprecated. Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, tostring, wait, wait, waitMethods inherited from interface Future
exceptionNow, resultNow, state
-
Constructor Details
-
FutureAdapter
-
-
Method Details
-
getAdaptee
-
cancel
-
isCancelled
public boolean isCancelled()Deprecated.- specified by:
isCancelled in interface Future<T>
-
isDone
-
get
Deprecated.- specified by:
get in interface Future<T>- Throws:
InterruptedExceptionExecutionException
-
get
public @Nullable T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Deprecated.- specified by:
get in interface Future<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
adapt
Deprecated.Adapts the given adaptee's result into T.- Returns:
- the adapted result
- Throws:
ExecutionException
-