Module org.elasticsearch.server
Package org.elasticsearch.action.support
Class ListenableActionFuture<T>
java.lang.Object
org.elasticsearch.action.support.SubscribableListener<T>
org.elasticsearch.action.support.ListenableActionFuture<T>
- All Implemented Interfaces:
ActionListener<T>
An
ActionListener which allows for the result to fan out to a (dynamic) collection of other listeners, added using SubscribableListener.addListener(org.elasticsearch.action.ActionListener<T>). Listeners added before completion are retained until completion; listeners added after completion are completed
immediately.
Similar to ListenableFuture and SubscribableListener except for its handling of exceptions: if this listener is completed
exceptionally with an ElasticsearchException that is also an ElasticsearchWrapperException then it is unwrapped using
ExceptionsHelper.unwrapCause(java.lang.Throwable); if the resulting exception is a checked exception then it is wrapped in an UncategorizedExecutionException. Moreover if this listener is completed exceptionally with a checked exception then it wraps the
exception in an UncategorizedExecutionException whose cause is an ExecutionException, whose cause in turn is the checked
exception. This matches the behaviour of PlainActionFuture.actionGet().-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.elasticsearch.action.support.SubscribableListener
addListener, addListener, addTimeout, andThen, andThen, andThen, andThenAccept, andThenApply, isDone, isSuccess, newFailed, newForked, newSucceeded, nullSuccess, onFailure, onResponse, rawResult, wrapAsExecutionExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.action.ActionListener
delegateFailure, delegateFailureAndWrap, delegateFailureIgnoreResponseAndWrap, delegateResponse, map, safeMap
-
Constructor Details
-
ListenableActionFuture
public ListenableActionFuture()
-
-
Method Details
-
actionResult
-
wrapException
- Overrides:
wrapExceptionin classSubscribableListener<T>
-