Package org.teiid.client.util
Class ResultsFuture<T>
- java.lang.Object
-
- org.teiid.client.util.ResultsFuture<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ResultsFuture.CompletionListener<T>
-
Field Summary
Fields Modifier and Type Field Description static ResultsFuture<Void>
NULL_FUTURE
-
Constructor Summary
Constructors Constructor Description ResultsFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCompletionListener(ResultsFuture.CompletionListener<T> listener)
boolean
cancel(boolean mayInterruptIfRunning)
protected T
convertResult()
T
get()
T
get(long timeout, TimeUnit unit)
ResultsReceiver<T>
getResultsReceiver()
boolean
isCancelled()
boolean
isDone()
-
-
-
Field Detail
-
NULL_FUTURE
public static final ResultsFuture<Void> NULL_FUTURE
-
-
Method Detail
-
getResultsReceiver
public ResultsReceiver<T> getResultsReceiver()
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
get
public T get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
-
convertResult
protected T convertResult() throws ExecutionException
- Throws:
ExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<T>
-
addCompletionListener
public void addCompletionListener(ResultsFuture.CompletionListener<T> listener)
-
-