org.elasticsearch.action
Interface ActionFuture<T>

All Superinterfaces:
Future<T>
All Known Subinterfaces:
ListenableActionFuture<T>
All Known Implementing Classes:
AbstractListenableActionFuture, AdapterActionFuture, PlainActionFuture, PlainListenableActionFuture

public interface ActionFuture<T>
extends Future<T>

An extension to Future allowing for simplified "get" operations.


Method Summary
 T actionGet()
          Similar to Future.get(), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.
 T actionGet(long timeoutMillis)
          Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.
 T actionGet(long timeout, TimeUnit unit)
          Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.
 T actionGet(String timeout)
          Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.
 T actionGet(TimeValue timeout)
          Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.
 Throwable getRootFailure()
          The root (possibly) wrapped failure.
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 

Method Detail

actionGet

T actionGet()
            throws ElasticSearchException
Similar to Future.get(), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped from RemoteTransportException. The root failure is still accessible using getRootFailure().

Throws:
ElasticSearchException

actionGet

T actionGet(String timeout)
            throws ElasticSearchException
Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped from RemoteTransportException. The root failure is still accessible using getRootFailure().

Throws:
ElasticSearchException

actionGet

T actionGet(long timeoutMillis)
            throws ElasticSearchException
Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped from RemoteTransportException. The root failure is still accessible using getRootFailure().

Parameters:
timeoutMillis - Timeout in millis
Throws:
ElasticSearchException

actionGet

T actionGet(long timeout,
            TimeUnit unit)
            throws ElasticSearchException
Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped from RemoteTransportException. The root failure is still accessible using getRootFailure().

Throws:
ElasticSearchException

actionGet

T actionGet(TimeValue timeout)
            throws ElasticSearchException
Similar to Future.get(long, java.util.concurrent.TimeUnit), just wrapping the InterruptedException with ElasticSearchInterruptedException, and throwing the actual cause of the ExecutionException.

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped from RemoteTransportException. The root failure is still accessible using getRootFailure().

Throws:
ElasticSearchException

getRootFailure

@Nullable
Throwable getRootFailure()
The root (possibly) wrapped failure.



Copyright © 2009-2012. All Rights Reserved.