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 booleancancel(boolean mayInterruptIfRunning)TOget()TOget(long timeout, TimeUnit unit)booleanisCancelled()booleanisDone()
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<FROM>
-
get
public TO get() throws InterruptedException, ExecutionException
- Specified by:
getin interfaceFuture<FROM>- Throws:
InterruptedExceptionExecutionException
-
get
public TO get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
getin interfaceFuture<FROM>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
-