Package org.elasticsearch.client
Class ClusterClient
java.lang.Object
org.elasticsearch.client.ClusterClient
Deprecated.
The High Level Rest Client is deprecated in favor of the
Elasticsearch Java API Client
A wrapper for the
RestHighLevelClient
that provides methods for accessing the Cluster API.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Delete a component template using the Component Templates APIdeleteComponentTemplateAsync
(DeleteComponentTemplateRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener) Deprecated.Asynchronously delete a component template using the Component Templates APIboolean
existsComponentTemplate
(ComponentTemplatesExistRequest componentTemplatesRequest, RequestOptions options) Deprecated.Uses the Component Templates API to determine if component templates existexistsComponentTemplateAsync
(ComponentTemplatesExistRequest componentTemplatesRequest, RequestOptions options, ActionListener<Boolean> listener) Deprecated.Uses the Index Templates API to determine if index templates existgetComponentTemplate
(GetComponentTemplatesRequest getComponentTemplatesRequest, RequestOptions options) Deprecated.Gets component templates using the Components Templates APIgetComponentTemplateAsync
(GetComponentTemplatesRequest getComponentTemplatesRequest, RequestOptions options, ActionListener<GetComponentTemplatesResponse> listener) Deprecated.Asynchronously gets component templates using the Components Templates APIgetSettings
(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options) Deprecated.Get the cluster wide settings using the Cluster Get Settings API.getSettingsAsync
(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options, ActionListener<ClusterGetSettingsResponse> listener) Deprecated.Asynchronously get the cluster wide settings using the Cluster Get Settings API.health
(ClusterHealthRequest healthRequest, RequestOptions options) Deprecated.Get cluster health using the Cluster Health API.healthAsync
(ClusterHealthRequest healthRequest, RequestOptions options, ActionListener<ClusterHealthResponse> listener) Deprecated.Asynchronously get cluster health using the Cluster Health API.putComponentTemplate
(PutComponentTemplateRequest putComponentTemplateRequest, RequestOptions options) Deprecated.Puts a component template using the Component Templates API.putComponentTemplateAsync
(PutComponentTemplateRequest putComponentTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener) Deprecated.Asynchronously puts a component template using the Component Templates API.putSettings
(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options) Deprecated.Updates cluster wide specific settings using the Cluster Update Settings API.putSettingsAsync
(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options, ActionListener<ClusterUpdateSettingsResponse> listener) Deprecated.Asynchronously updates cluster wide specific settings using the Cluster Update Settings API.remoteInfo
(RemoteInfoRequest request, RequestOptions options) Deprecated.Get the remote cluster information using the Remote cluster info API.remoteInfoAsync
(RemoteInfoRequest request, RequestOptions options, ActionListener<RemoteInfoResponse> listener) Deprecated.Asynchronously get remote cluster information using the Remote cluster info API.
-
Method Details
-
putSettings
public ClusterUpdateSettingsResponse putSettings(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options) throws IOException Deprecated.Updates cluster wide specific settings using the Cluster Update Settings API. See Cluster Update Settings API on elastic.co- Parameters:
clusterUpdateSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
putSettingsAsync
public Cancellable putSettingsAsync(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options, ActionListener<ClusterUpdateSettingsResponse> listener) Deprecated.Asynchronously updates cluster wide specific settings using the Cluster Update Settings API. See Cluster Update Settings API on elastic.co- Parameters:
clusterUpdateSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getSettings
public ClusterGetSettingsResponse getSettings(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options) throws IOException Deprecated.Get the cluster wide settings using the Cluster Get Settings API. See Cluster Get Settings API on elastic.co- Parameters:
clusterGetSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
getSettingsAsync
public Cancellable getSettingsAsync(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options, ActionListener<ClusterGetSettingsResponse> listener) Deprecated.Asynchronously get the cluster wide settings using the Cluster Get Settings API. See Cluster Get Settings API on elastic.co- Parameters:
clusterGetSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
health
public ClusterHealthResponse health(ClusterHealthRequest healthRequest, RequestOptions options) throws IOException Deprecated.Get cluster health using the Cluster Health API. See Cluster Health API on elastic.coIf timeout occurred,
ClusterHealthResponse
will have isTimedOut() == true and status() == RestStatus.REQUEST_TIMEOUT- Parameters:
healthRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
healthAsync
public Cancellable healthAsync(ClusterHealthRequest healthRequest, RequestOptions options, ActionListener<ClusterHealthResponse> listener) Deprecated.Asynchronously get cluster health using the Cluster Health API. See Cluster Health API on elastic.co If timeout occurred,ClusterHealthResponse
will have isTimedOut() == true and status() == RestStatus.REQUEST_TIMEOUT- Parameters:
healthRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
remoteInfo
public RemoteInfoResponse remoteInfo(RemoteInfoRequest request, RequestOptions options) throws IOException Deprecated.Get the remote cluster information using the Remote cluster info API. See Remote cluster info API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
remoteInfoAsync
public Cancellable remoteInfoAsync(RemoteInfoRequest request, RequestOptions options, ActionListener<RemoteInfoResponse> listener) Deprecated.Asynchronously get remote cluster information using the Remote cluster info API. See Remote cluster info API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteComponentTemplate
public AcknowledgedResponse deleteComponentTemplate(DeleteComponentTemplateRequest req, RequestOptions options) throws IOException Deprecated.Delete a component template using the Component Templates API- Parameters:
req
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
deleteComponentTemplateAsync
public Cancellable deleteComponentTemplateAsync(DeleteComponentTemplateRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener) Deprecated.Asynchronously delete a component template using the Component Templates API- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putComponentTemplate
public AcknowledgedResponse putComponentTemplate(PutComponentTemplateRequest putComponentTemplateRequest, RequestOptions options) throws IOException Deprecated.Puts a component template using the Component Templates API.- Parameters:
putComponentTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
putComponentTemplateAsync
public Cancellable putComponentTemplateAsync(PutComponentTemplateRequest putComponentTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener) Deprecated.Asynchronously puts a component template using the Component Templates API.- Parameters:
putComponentTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getComponentTemplate
public GetComponentTemplatesResponse getComponentTemplate(GetComponentTemplatesRequest getComponentTemplatesRequest, RequestOptions options) throws IOException Deprecated.Gets component templates using the Components Templates API- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedgetComponentTemplatesRequest
- the request- Returns:
- the response
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
getComponentTemplateAsync
public Cancellable getComponentTemplateAsync(GetComponentTemplatesRequest getComponentTemplatesRequest, RequestOptions options, ActionListener<GetComponentTemplatesResponse> listener) Deprecated.Asynchronously gets component templates using the Components Templates API- Parameters:
getComponentTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
existsComponentTemplate
public boolean existsComponentTemplate(ComponentTemplatesExistRequest componentTemplatesRequest, RequestOptions options) throws IOException Deprecated.Uses the Component Templates API to determine if component templates exist- Parameters:
componentTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- true if any index templates in the request exist, false otherwise
- Throws:
IOException
- in case there is a problem sending the request or parsing back the response
-
existsComponentTemplateAsync
public Cancellable existsComponentTemplateAsync(ComponentTemplatesExistRequest componentTemplatesRequest, RequestOptions options, ActionListener<Boolean> listener) Deprecated.Uses the Index Templates API to determine if index templates exist- Parameters:
componentTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion. The listener will be called with the valuetrue
- Returns:
- cancellable that may be used to cancel the request
-