org.elasticsearch.action.support
Class AbstractListenableActionFuture<T,L>

java.lang.Object
  extended by org.elasticsearch.common.util.concurrent.BaseFuture<T>
      extended by org.elasticsearch.action.support.AdapterActionFuture<T,L>
          extended by org.elasticsearch.action.support.AbstractListenableActionFuture<T,L>
All Implemented Interfaces:
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>


Constructor Summary
protected AbstractListenableActionFuture(boolean listenerThreaded, ThreadPool threadPool)
           
 
Method Summary
 void addListener(ActionListener<T> listener)
          Add an action listener to be invoked when a response has received.
 void addListener(Runnable listener)
          Add an action listener (runnable) to be invoked when a response has received.
protected  void done()
           
 void internalAddListener(Object listener)
           
 boolean listenerThreaded()
           
 ThreadPool threadPool()
           
 
Methods inherited from class org.elasticsearch.action.support.AdapterActionFuture
actionGet, actionGet, actionGet, actionGet, actionGet, convert, getRootFailure, onFailure, onResponse
 
Methods inherited from class org.elasticsearch.common.util.concurrent.BaseFuture
cancel, get, get, interruptTask, 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 org.elasticsearch.action.ActionFuture
actionGet, actionGet, actionGet, actionGet, actionGet, getRootFailure
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 

Constructor Detail

AbstractListenableActionFuture

protected AbstractListenableActionFuture(boolean listenerThreaded,
                                         ThreadPool threadPool)
Method Detail

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(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(Object listener)

done

protected void done()
Overrides:
done in class BaseFuture<T>


Copyright © 2009-2012. All Rights Reserved.