public abstract class AdapterActionFuture<T,L> extends BaseFuture<T> implements ActionFuture<T>, ActionListener<L>
Constructor and Description |
---|
AdapterActionFuture() |
cancel, done, get, get, interruptTask, isCancelled, isDone, set, setException
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(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>
timeout
- Timeoutpublic 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>
timeout
- Timeoutpublic T actionGet(long timeout, 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>
timeout
- Timeoutunit
- Time unit for the timeoutpublic void onResponse(L result)
ActionListener
onResponse
in interface ActionListener<L>
public void onFailure(Throwable e)
ActionListener
onFailure
in interface ActionListener<L>
Copyright © 2009–2016. All rights reserved.