V
- The result type returned by this Future's get method.public class FutureWrapper<V> extends Object implements Future<V>
Constructor and Description |
---|
FutureWrapper(V object)
Create a wrapper to an object that looks like a Future on that object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long arg0,
TimeUnit arg1) |
boolean |
isCancelled() |
boolean |
isDone() |
public FutureWrapper(V object)
object
- Object to wrap.public boolean cancel(boolean mayInterruptIfRunning)
public V get() throws InterruptedException, ExecutionException
get
in interface Future<V>
InterruptedException
ExecutionException
public V get(long arg0, TimeUnit arg1) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
public boolean isCancelled()
isCancelled
in interface Future<V>
Copyright © 2016. All rights reserved.