org.elasticsearch.transport
Class PlainTransportFuture<V extends Streamable>
java.lang.Object
org.elasticsearch.common.util.concurrent.BaseFuture<V>
org.elasticsearch.transport.PlainTransportFuture<V>
- All Implemented Interfaces:
- Future<V>, TransportFuture<V>, TransportResponseHandler<V>
public class PlainTransportFuture<V extends Streamable>
- extends BaseFuture<V>
- implements TransportFuture<V>, TransportResponseHandler<V>
PlainTransportFuture
public PlainTransportFuture(TransportResponseHandler<V> handler)
txGet
public V txGet()
throws ElasticSearchException
- Description copied from interface:
TransportFuture
- Waits if necessary for the computation to complete, and then
retrieves its result.
- Specified by:
txGet
in interface TransportFuture<V extends Streamable>
- Throws:
ElasticSearchException
txGet
public V txGet(long timeout,
TimeUnit unit)
throws ElasticSearchException
- Description copied from interface:
TransportFuture
- Waits if necessary for at most the given time for the computation
to complete, and then retrieves its result, if available.
- Specified by:
txGet
in interface TransportFuture<V extends Streamable>
- Throws:
ElasticSearchException
newInstance
public V newInstance()
- Description copied from interface:
TransportResponseHandler
- creates a new instance of the return type from the remote call.
called by the infra before de-serializing the response.
- Specified by:
newInstance
in interface TransportResponseHandler<V extends Streamable>
- Returns:
- a new response copy.
executor
public String executor()
- Specified by:
executor
in interface TransportResponseHandler<V extends Streamable>
handleResponse
public void handleResponse(V response)
- Specified by:
handleResponse
in interface TransportResponseHandler<V extends Streamable>
handleException
public void handleException(TransportException exp)
- Specified by:
handleException
in interface TransportResponseHandler<V extends Streamable>
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2012. All Rights Reserved.