Package com.oracle.bmc.util.internal
Class TransformingFuture<FROM,TO>
- java.lang.Object
-
- com.oracle.bmc.util.internal.TransformingFuture<FROM,TO>
-
- Type Parameters:
FROM
- The type returned by the delegate Future.TO
- The type to convert to.
- All Implemented Interfaces:
Future<TO>
public class TransformingFuture<FROM,TO> extends Object implements Future<TO>
Future that both delegates to another one and provides the ability to transform the response to another type.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
TO
get()
TO
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<FROM>
-
get
public TO get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<FROM>
- Throws:
InterruptedException
ExecutionException
-
get
public TO get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<FROM>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-