Module org.elasticsearch.server
Package org.elasticsearch.transport
Interface TransportResponseHandler<T extends TransportResponse>
- All Superinterfaces:
Writeable.Reader<T>
- All Known Implementing Classes:
ActionListenerResponseHandler
,CleanableResponseHandler
,TransportResponseHandler.Empty
,TransportService.ContextRestoreResponseHandler
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Implementation ofTransportResponseHandler
that handles the empty responseTransportResponse.Empty
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Executor
Alias forEsExecutors.DIRECT_EXECUTOR_SERVICE
which emphasises that non-forking transport response handlers do their work on the transport worker (unless the request is being sent to the local node, but that's not the common case). -
Method Summary
Modifier and TypeMethodDescriptionempty
(Executor executor, ActionListener<Void> listener) executor
(ThreadPool threadPool) void
void
handleResponse
(T response) Methods inherited from interface org.elasticsearch.common.io.stream.Writeable.Reader
read
-
Field Details
-
TRANSPORT_WORKER
Alias forEsExecutors.DIRECT_EXECUTOR_SERVICE
which emphasises that non-forking transport response handlers do their work on the transport worker (unless the request is being sent to the local node, but that's not the common case). You must only use this executor for handling responses to very performance-critical actions, and even then only if the deserialization and handling work is very cheap, because this executor will perform all the work for responses from remote nodes on the receiving transport worker itself.
-
-
Method Details
-
executor
- Returns:
- the executor to use to deserialize the response and notify the listener. You must only use
EsExecutors.DIRECT_EXECUTOR_SERVICE
(or equivalentlyTRANSPORT_WORKER
) for very performance-critical actions, and even then only if the deserialization and handling work is very cheap, because this executor will perform all the work for responses from remote nodes on the receiving transport worker itself.
-
handleResponse
-
handleException
-
empty
-