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() throws ElasticsearchException
ActionFuture
Future.get()
, just catching the InterruptedException
and throwing
an ElasticsearchIllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.
Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
from RemoteTransportException
. The root failure is
still accessible using ActionFuture.getRootFailure()
.
actionGet
in interface ActionFuture<T>
ElasticsearchException
public T actionGet(String timeout) throws ElasticsearchException
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an ElasticsearchIllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.
Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
from RemoteTransportException
. The root failure is
still accessible using ActionFuture.getRootFailure()
.
actionGet
in interface ActionFuture<T>
ElasticsearchException
public T actionGet(long timeoutMillis) throws ElasticsearchException
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an ElasticsearchIllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.
Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
from RemoteTransportException
. The root failure is
still accessible using ActionFuture.getRootFailure()
.
actionGet
in interface ActionFuture<T>
timeoutMillis
- Timeout in millisElasticsearchException
public T actionGet(TimeValue timeout) throws ElasticsearchException
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an ElasticsearchIllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.
Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
from RemoteTransportException
. The root failure is
still accessible using ActionFuture.getRootFailure()
.
actionGet
in interface ActionFuture<T>
ElasticsearchException
public T actionGet(long timeout, TimeUnit unit) throws ElasticsearchException
ActionFuture
Future.get(long, java.util.concurrent.TimeUnit)
, just catching the InterruptedException
and throwing
an ElasticsearchIllegalStateException
instead. Also catches
ExecutionException
and throws the actual cause instead.
Note, the actual cause is unwrapped to the actual failure (for example, unwrapped
from RemoteTransportException
. The root failure is
still accessible using ActionFuture.getRootFailure()
.
actionGet
in interface ActionFuture<T>
ElasticsearchException
public void onResponse(L result)
ActionListener
onResponse
in interface ActionListener<L>
public void onFailure(Throwable e)
ActionListener
onFailure
in interface ActionListener<L>
public Throwable getRootFailure()
ActionFuture
getRootFailure
in interface ActionFuture<T>
Copyright © 2009–2015. All rights reserved.