public abstract class AdapterActionFuture<T,L> extends BaseFuture<T> implements ActionFuture<T>, ActionListener<L>
Constructor and Description |
---|
AdapterActionFuture() |
Modifier and Type | Method and Description |
---|---|
T |
actionGet()
Similar to
Future.get() , just catching the InterruptedException and throwing
an IllegalStateException instead. |
T |
actionGet(long timeoutMillis)
Similar to
Future.get(long, java.util.concurrent.TimeUnit) , just catching the InterruptedException and throwing
an IllegalStateException instead. |
T |
actionGet(long timeout,
java.util.concurrent.TimeUnit unit)
Similar to
Future.get(long, java.util.concurrent.TimeUnit) , just catching the InterruptedException and throwing
an IllegalStateException instead. |
T |
actionGet(java.lang.String timeout)
Similar to
Future.get(long, java.util.concurrent.TimeUnit) , just catching the InterruptedException and throwing
an IllegalStateException instead. |
T |
actionGet(TimeValue timeout)
Similar to
Future.get(long, java.util.concurrent.TimeUnit) , just catching the InterruptedException and throwing
an IllegalStateException instead. |
protected abstract T |
convert(L listenerResponse) |
void |
onFailure(java.lang.Exception e)
A failure caused by an exception at some phase of the task.
|
void |
onResponse(L result)
Handle action response.
|
cancel, done, get, get, interruptTask, isCancelled, isDone, set, setException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onFailure, onResponse, wrap
public T actionGet()
ActionFuture
Future.get()
, just catching the InterruptedException
and throwing
an IllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.actionGet
in interface ActionFuture<T>
public T actionGet(java.lang.String timeout)
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an IllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.actionGet
in interface ActionFuture<T>
public T actionGet(long timeoutMillis)
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an IllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.actionGet
in interface ActionFuture<T>
timeoutMillis
- Timeout in millispublic T actionGet(TimeValue timeout)
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an IllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.actionGet
in interface ActionFuture<T>
public T actionGet(long timeout, java.util.concurrent.TimeUnit unit)
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an IllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.actionGet
in interface ActionFuture<T>
public void onResponse(L result)
ActionListener
onResponse
in interface ActionListener<L>
public void onFailure(java.lang.Exception e)
ActionListener
onFailure
in interface ActionListener<L>