类 ClusterClient
java.lang.Object
org.easysearch.client.ClusterClient
public final class ClusterClient
extends java.lang.Object
A wrapper for the
RestHighLevelClient that provides methods for accessing the Cluster API.
-
方法概要
修饰符和类型 方法 说明 org.easysearch.action.support.master.AcknowledgedResponsedeleteComponentTemplate(DeleteComponentTemplateRequest req, org.easysearch.client.RequestOptions options)Delete a component template using the Component Templates APIorg.easysearch.client.CancellabledeleteComponentTemplateAsync(DeleteComponentTemplateRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.support.master.AcknowledgedResponse> listener)Asynchronously delete a component template using the Component Templates APIbooleanexistsComponentTemplate(ComponentTemplatesExistRequest componentTemplatesRequest, org.easysearch.client.RequestOptions options)Uses the Component Templates API to determine if component templates existorg.easysearch.client.CancellableexistsComponentTemplateAsync(ComponentTemplatesExistRequest componentTemplatesRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<java.lang.Boolean> listener)Uses the Index Templates API to determine if index templates existGetComponentTemplatesResponsegetComponentTemplate(GetComponentTemplatesRequest getComponentTemplatesRequest, org.easysearch.client.RequestOptions options)Gets component templates using the Components Templates APIorg.easysearch.client.CancellablegetComponentTemplateAsync(GetComponentTemplatesRequest getComponentTemplatesRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<GetComponentTemplatesResponse> listener)Asynchronously gets component templates using the Components Templates APIorg.easysearch.action.admin.cluster.settings.ClusterGetSettingsResponsegetSettings(org.easysearch.action.admin.cluster.settings.ClusterGetSettingsRequest clusterGetSettingsRequest, org.easysearch.client.RequestOptions options)Get the cluster wide settings using the Cluster Get Settings API.org.easysearch.client.CancellablegetSettingsAsync(org.easysearch.action.admin.cluster.settings.ClusterGetSettingsRequest clusterGetSettingsRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.settings.ClusterGetSettingsResponse> listener)Asynchronously get the cluster wide settings using the Cluster Get Settings API.org.easysearch.action.admin.cluster.health.ClusterHealthResponsehealth(org.easysearch.action.admin.cluster.health.ClusterHealthRequest healthRequest, org.easysearch.client.RequestOptions options)Get cluster health using the Cluster Health API.org.easysearch.client.CancellablehealthAsync(org.easysearch.action.admin.cluster.health.ClusterHealthRequest healthRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.health.ClusterHealthResponse> listener)Asynchronously get cluster health using the Cluster Health API.org.easysearch.action.support.master.AcknowledgedResponseputComponentTemplate(PutComponentTemplateRequest putComponentTemplateRequest, org.easysearch.client.RequestOptions options)Puts a component template using the Component Templates API.org.easysearch.client.CancellableputComponentTemplateAsync(PutComponentTemplateRequest putComponentTemplateRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.support.master.AcknowledgedResponse> listener)Asynchronously puts a component template using the Component Templates API.org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsResponseputSettings(org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, org.easysearch.client.RequestOptions options)Updates cluster wide specific settings using the Cluster Update Settings API.org.easysearch.client.CancellableputSettingsAsync(org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse> listener)Asynchronously updates cluster wide specific settings using the Cluster Update Settings API.RemoteInfoResponseremoteInfo(RemoteInfoRequest request, org.easysearch.client.RequestOptions options)Get the remote cluster information using the Remote cluster info API.org.easysearch.client.CancellableremoteInfoAsync(RemoteInfoRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<RemoteInfoResponse> listener)Asynchronously get remote cluster information using the Remote cluster info API.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
方法详细资料
-
putSettings
public org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse putSettings(org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionUpdates cluster wide specific settings using the Cluster Update Settings API.- 参数:
clusterUpdateSettingsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putSettingsAsync
public org.easysearch.client.Cancellable putSettingsAsync(org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest clusterUpdateSettingsRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse> listener)Asynchronously updates cluster wide specific settings using the Cluster Update Settings API.- 参数:
clusterUpdateSettingsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
getSettings
public org.easysearch.action.admin.cluster.settings.ClusterGetSettingsResponse getSettings(org.easysearch.action.admin.cluster.settings.ClusterGetSettingsRequest clusterGetSettingsRequest, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionGet the cluster wide settings using the Cluster Get Settings API.- 参数:
clusterGetSettingsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getSettingsAsync
public org.easysearch.client.Cancellable getSettingsAsync(org.easysearch.action.admin.cluster.settings.ClusterGetSettingsRequest clusterGetSettingsRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.settings.ClusterGetSettingsResponse> listener)Asynchronously get the cluster wide settings using the Cluster Get Settings API.- 参数:
clusterGetSettingsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
health
public org.easysearch.action.admin.cluster.health.ClusterHealthResponse health(org.easysearch.action.admin.cluster.health.ClusterHealthRequest healthRequest, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionGet cluster health using the Cluster Health API. If timeout occurred,ClusterHealthResponsewill have isTimedOut() == true and status() == RestStatus.REQUEST_TIMEOUT- 参数:
healthRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
healthAsync
public org.easysearch.client.Cancellable healthAsync(org.easysearch.action.admin.cluster.health.ClusterHealthRequest healthRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.admin.cluster.health.ClusterHealthResponse> listener)Asynchronously get cluster health using the Cluster Health API. If timeout occurred,ClusterHealthResponsewill have isTimedOut() == true and status() == RestStatus.REQUEST_TIMEOUT- 参数:
healthRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
remoteInfo
public RemoteInfoResponse remoteInfo(RemoteInfoRequest request, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionGet the remote cluster information using the Remote cluster info API.- 参数:
request- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
remoteInfoAsync
public org.easysearch.client.Cancellable remoteInfoAsync(RemoteInfoRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<RemoteInfoResponse> listener)Asynchronously get remote cluster information using the Remote cluster info API.- 参数:
request- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
deleteComponentTemplate
public org.easysearch.action.support.master.AcknowledgedResponse deleteComponentTemplate(DeleteComponentTemplateRequest req, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionDelete a component template using the Component Templates API- 参数:
req- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
deleteComponentTemplateAsync
public org.easysearch.client.Cancellable deleteComponentTemplateAsync(DeleteComponentTemplateRequest request, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.support.master.AcknowledgedResponse> listener)Asynchronously delete a component template using the Component Templates API- 参数:
request- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
putComponentTemplate
public org.easysearch.action.support.master.AcknowledgedResponse putComponentTemplate(PutComponentTemplateRequest putComponentTemplateRequest, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionPuts a component template using the Component Templates API.- 参数:
putComponentTemplateRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
putComponentTemplateAsync
public org.easysearch.client.Cancellable putComponentTemplateAsync(PutComponentTemplateRequest putComponentTemplateRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<org.easysearch.action.support.master.AcknowledgedResponse> listener)Asynchronously puts a component template using the Component Templates API.- 参数:
putComponentTemplateRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
getComponentTemplate
public GetComponentTemplatesResponse getComponentTemplate(GetComponentTemplatesRequest getComponentTemplatesRequest, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionGets component templates using the Components Templates API- 参数:
options- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedgetComponentTemplatesRequest- the request- 返回:
- the response
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
getComponentTemplateAsync
public org.easysearch.client.Cancellable getComponentTemplateAsync(GetComponentTemplatesRequest getComponentTemplatesRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<GetComponentTemplatesResponse> listener)Asynchronously gets component templates using the Components Templates API- 参数:
getComponentTemplatesRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion- 返回:
- cancellable that may be used to cancel the request
-
existsComponentTemplate
public boolean existsComponentTemplate(ComponentTemplatesExistRequest componentTemplatesRequest, org.easysearch.client.RequestOptions options) throws java.io.IOExceptionUses the Component Templates API to determine if component templates exist- 参数:
componentTemplatesRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- 返回:
- true if any index templates in the request exist, false otherwise
- 抛出:
java.io.IOException- in case there is a problem sending the request or parsing back the response
-
existsComponentTemplateAsync
public org.easysearch.client.Cancellable existsComponentTemplateAsync(ComponentTemplatesExistRequest componentTemplatesRequest, org.easysearch.client.RequestOptions options, org.easysearch.action.ActionListener<java.lang.Boolean> listener)Uses the Index Templates API to determine if index templates exist- 参数:
componentTemplatesRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion. The listener will be called with the valuetrue- 返回:
- cancellable that may be used to cancel the request
-