Package org.elasticsearch.transport
Class PlainTransportFuture<V extends TransportResponse>
- java.lang.Object
-
- org.elasticsearch.common.util.concurrent.BaseFuture<V>
-
- org.elasticsearch.transport.PlainTransportFuture<V>
-
- All Implemented Interfaces:
java.util.concurrent.Future<V>
,Writeable.Reader<V>
,TransportFuture<V>
,TransportResponseHandler<V>
public class PlainTransportFuture<V extends TransportResponse> extends BaseFuture<V> implements TransportFuture<V>, TransportResponseHandler<V>
-
-
Constructor Summary
Constructors Constructor Description PlainTransportFuture(TransportResponseHandler<V> handler)
-
Method Summary
Modifier and Type Method Description java.lang.String
executor()
void
handleException(TransportException exp)
void
handleResponse(V response)
V
read(StreamInput in)
ReadV
-type value from a stream.java.lang.String
toString()
V
txGet()
Waits if necessary for the computation to complete, and then retrieves its result.V
txGet(long timeout, java.util.concurrent.TimeUnit unit)
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.-
Methods inherited from class org.elasticsearch.common.util.concurrent.BaseFuture
cancel, done, get, get, interruptTask, isCancelled, isDone, set, setException
-
-
-
-
Constructor Detail
-
PlainTransportFuture
public PlainTransportFuture(TransportResponseHandler<V> handler)
-
-
Method Detail
-
txGet
public V txGet()
Description copied from interface:TransportFuture
Waits if necessary for the computation to complete, and then retrieves its result.- Specified by:
txGet
in interfaceTransportFuture<V extends TransportResponse>
-
txGet
public V txGet(long timeout, java.util.concurrent.TimeUnit unit)
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 interfaceTransportFuture<V extends TransportResponse>
-
read
public V read(StreamInput in) throws java.io.IOException
Description copied from interface:Writeable.Reader
ReadV
-type value from a stream.- Specified by:
read
in interfaceWriteable.Reader<V extends TransportResponse>
- Parameters:
in
- Input to read the value from- Throws:
java.io.IOException
-
executor
public java.lang.String executor()
- Specified by:
executor
in interfaceTransportResponseHandler<V extends TransportResponse>
-
handleResponse
public void handleResponse(V response)
- Specified by:
handleResponse
in interfaceTransportResponseHandler<V extends TransportResponse>
-
handleException
public void handleException(TransportException exp)
- Specified by:
handleException
in interfaceTransportResponseHandler<V extends TransportResponse>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-