org.elasticsearch.action.support
Class AbstractListenableActionFuture<T,L>
java.lang.Object
org.elasticsearch.common.util.concurrent.AbstractFuture<T>
org.elasticsearch.action.support.AdapterActionFuture<T,L>
org.elasticsearch.action.support.AbstractListenableActionFuture<T,L>
- All Implemented Interfaces:
- java.util.concurrent.Future<T>, ActionFuture<T>, ActionListener<L>, ListenableActionFuture<T>
- Direct Known Subclasses:
- PlainListenableActionFuture
public abstract class AbstractListenableActionFuture<T,L>
- extends AdapterActionFuture<T,L>
- implements ListenableActionFuture<T>
Methods inherited from class org.elasticsearch.common.util.concurrent.AbstractFuture |
cancel, cancel, get, get, isCancelled, isDone, set, setException |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.concurrent.Future |
cancel, get, get, isCancelled, isDone |
AbstractListenableActionFuture
protected AbstractListenableActionFuture(boolean listenerThreaded,
ThreadPool threadPool)
listenerThreaded
public boolean listenerThreaded()
threadPool
public ThreadPool threadPool()
addListener
public void addListener(ActionListener<T> listener)
- Description copied from interface:
ListenableActionFuture
- Add an action listener to be invoked when a response has received.
- Specified by:
addListener
in interface ListenableActionFuture<T>
addListener
public void addListener(java.lang.Runnable listener)
- Description copied from interface:
ListenableActionFuture
- Add an action listener (runnable) to be invoked when a response has received.
- Specified by:
addListener
in interface ListenableActionFuture<T>
internalAddListener
public void internalAddListener(java.lang.Object listener)
done
protected void done()
- Overrides:
done
in class org.elasticsearch.common.util.concurrent.AbstractFuture<T>