java.lang.Object
org.elasticsearch.client.internal.support.AbstractClient
org.elasticsearch.client.internal.node.NodeClient
- All Implemented Interfaces:
Client
,ElasticsearchClient
Client that executes actions on the local node.
-
Field Summary
Fields inherited from class org.elasticsearch.client.internal.support.AbstractClient
logger, settings
Fields inherited from interface org.elasticsearch.client.internal.Client
CLIENT_TYPE_SETTING_S
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<Request extends ActionRequest,
Response extends ActionResponse>
voiddoExecute
(ActionType<Response> action, Request request, ActionListener<Response> listener) <Request extends ActionRequest,
Response extends ActionResponse>
TaskexecuteLocally
(ActionType<Response> action, Request request, ActionListener<Response> listener) Return the names of all available actions registered with this client.The id of the localDiscoveryNode
.getRemoteClusterClient
(String clusterAlias, Executor responseExecutor, RemoteClusterService.DisconnectedStrategy disconnectedStrategy) Returns a client to a remote cluster with the given cluster alias.void
initialize
(Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions, TaskManager taskManager, Supplier<String> localNodeId, Transport.Connection localConnection, RemoteClusterService remoteClusterService) Methods inherited from class org.elasticsearch.client.internal.support.AbstractClient
admin, bulk, bulk, clearScroll, clearScroll, delete, delete, execute, execute, explain, explain, fieldCaps, fieldCaps, filterWithHeader, get, get, index, index, multiGet, multiGet, multiSearch, multiSearch, multiTermVectors, multiTermVectors, prepareBulk, prepareBulk, prepareClearScroll, prepareDelete, prepareDelete, prepareExplain, prepareFieldCaps, prepareGet, prepareGet, prepareIndex, prepareIndex, prepareMultiGet, prepareMultiSearch, prepareMultiTermVectors, prepareSearch, prepareSearchScroll, prepareTermVectors, prepareTermVectors, prepareUpdate, prepareUpdate, search, search, searchScroll, searchScroll, settings, termVectors, termVectors, threadPool, update, update
-
Constructor Details
-
NodeClient
-
-
Method Details
-
initialize
public void initialize(Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions, TaskManager taskManager, Supplier<String> localNodeId, Transport.Connection localConnection, RemoteClusterService remoteClusterService) -
getActionNames
Return the names of all available actions registered with this client. -
doExecute
public <Request extends ActionRequest,Response extends ActionResponse> void doExecute(ActionType<Response> action, Request request, ActionListener<Response> listener) - Specified by:
doExecute
in classAbstractClient
-
executeLocally
public <Request extends ActionRequest,Response extends ActionResponse> Task executeLocally(ActionType<Response> action, Request request, ActionListener<Response> listener) Execute anActionType
locally, returning thatTask
used to track it, and linking anActionListener
. Prefer this method if you don't need access to the task when listening for the response. This is the method used to implement theClient
interface.- Throws:
TaskCancelledException
- if the request's parent task has been cancelled already
-
getLocalNodeId
The id of the localDiscoveryNode
. Useful for generating task ids from tasks returned byexecuteLocally(ActionType, ActionRequest, ActionListener)
. -
getRemoteClusterClient
public RemoteClusterClient getRemoteClusterClient(String clusterAlias, Executor responseExecutor, RemoteClusterService.DisconnectedStrategy disconnectedStrategy) Description copied from interface:Client
Returns a client to a remote cluster with the given cluster alias.
-