Package org.elasticsearch.client
Class ClusterClient
- java.lang.Object
-
- org.elasticsearch.client.ClusterClient
-
public final class ClusterClient extends java.lang.ObjectA wrapper for theRestHighLevelClientthat provides methods for accessing the Cluster API.
-
-
Method Summary
Modifier and Type Method Description ClusterGetSettingsResponsegetSettings(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options)Get the cluster wide settings using the Cluster Get Settings API.voidgetSettingsAsync(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options, ActionListener<ClusterGetSettingsResponse> listener)Asynchronously get the cluster wide settings using the Cluster Get Settings API.ClusterHealthResponsehealth(ClusterHealthRequest healthRequest, RequestOptions options)Get cluster health using the Cluster Health API.voidhealthAsync(ClusterHealthRequest healthRequest, RequestOptions options, ActionListener<ClusterHealthResponse> listener)Asynchronously get cluster health using the Cluster Health API.ClusterUpdateSettingsResponseputSettings(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options)Updates cluster wide specific settings using the Cluster Update Settings API.voidputSettingsAsync(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options, ActionListener<ClusterUpdateSettingsResponse> listener)Asynchronously updates cluster wide specific settings using the Cluster Update Settings API.
-
-
-
Method Detail
-
putSettings
public ClusterUpdateSettingsResponse putSettings(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options) throws java.io.IOException
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.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putSettingsAsync
public void putSettingsAsync(ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, RequestOptions options, ActionListener<ClusterUpdateSettingsResponse> listener)
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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
getSettings
public ClusterGetSettingsResponse getSettings(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options) throws java.io.IOException
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.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getSettingsAsync
public void getSettingsAsync(ClusterGetSettingsRequest clusterGetSettingsRequest, RequestOptions options, ActionListener<ClusterGetSettingsResponse> listener)
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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
health
public ClusterHealthResponse health(ClusterHealthRequest healthRequest, RequestOptions options) throws java.io.IOException
Get cluster health using the Cluster Health API. See Cluster Health API on elastic.coIf timeout occurred,
ClusterHealthResponsewill have isTimedOut() == true and status() == RestStatus.REQUEST_TIMEOUT- Parameters:
healthRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
healthAsync
public void healthAsync(ClusterHealthRequest healthRequest, RequestOptions options, ActionListener<ClusterHealthResponse> listener)
Asynchronously get cluster health using the Cluster Health API. See Cluster Health API on elastic.co If timeout occurred,ClusterHealthResponsewill have isTimedOut() == true and status() == RestStatus.REQUEST_TIMEOUT- Parameters:
healthRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
-