Class ClusterAsyncClient
java.lang.Object
org.opensearch.client.base.ApiClient<ClusterAsyncClient>
org.opensearch.client.opensearch.api.cluster.ClusterAsyncClient
public class ClusterAsyncClient extends ApiClient<ClusterAsyncClient>
Client for the cluster namespace.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ClusterAsyncClient(Transport transport)ClusterAsyncClient(Transport transport, org.opensearch.client.RequestOptions options) -
Method Summary
Modifier and Type Method Description java.util.concurrent.CompletableFuture<AllocationExplainResponse>allocationExplain(java.util.function.Function<AllocationExplainRequest.Builder,ObjectBuilder<AllocationExplainRequest>> fn)Provides explanations for shard allocations in the cluster.java.util.concurrent.CompletableFuture<AllocationExplainResponse>allocationExplain(AllocationExplainRequest request)Provides explanations for shard allocations in the cluster.java.util.concurrent.CompletableFuture<DeleteComponentTemplateResponse>deleteComponentTemplate(java.util.function.Function<DeleteComponentTemplateRequest.Builder,ObjectBuilder<DeleteComponentTemplateRequest>> fn)Deletes a component templatejava.util.concurrent.CompletableFuture<DeleteComponentTemplateResponse>deleteComponentTemplate(DeleteComponentTemplateRequest request)Deletes a component templatejava.util.concurrent.CompletableFuture<DeleteVotingConfigExclusionsResponse>deleteVotingConfigExclusions(java.util.function.Function<DeleteVotingConfigExclusionsRequest.Builder,ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn)Clears cluster voting config exclusions.java.util.concurrent.CompletableFuture<DeleteVotingConfigExclusionsResponse>deleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequest request)Clears cluster voting config exclusions.java.util.concurrent.CompletableFuture<ExistsComponentTemplateResponse>existsComponentTemplate(java.util.function.Function<ExistsComponentTemplateRequest.Builder,ObjectBuilder<ExistsComponentTemplateRequest>> fn)Returns information about whether a particular component template existjava.util.concurrent.CompletableFuture<ExistsComponentTemplateResponse>existsComponentTemplate(ExistsComponentTemplateRequest request)Returns information about whether a particular component template existjava.util.concurrent.CompletableFuture<GetComponentTemplateResponse>getComponentTemplate(java.util.function.Function<GetComponentTemplateRequest.Builder,ObjectBuilder<GetComponentTemplateRequest>> fn)Returns one or more component templatesjava.util.concurrent.CompletableFuture<GetComponentTemplateResponse>getComponentTemplate(GetComponentTemplateRequest request)Returns one or more component templatesjava.util.concurrent.CompletableFuture<GetSettingsResponse>getSettings(java.util.function.Function<GetSettingsRequest.Builder,ObjectBuilder<GetSettingsRequest>> fn)Returns cluster settings.java.util.concurrent.CompletableFuture<GetSettingsResponse>getSettings(GetSettingsRequest request)Returns cluster settings.java.util.concurrent.CompletableFuture<HealthResponse>health(java.util.function.Function<HealthRequest.Builder,ObjectBuilder<HealthRequest>> fn)Returns basic information about the health of the cluster.java.util.concurrent.CompletableFuture<HealthResponse>health(HealthRequest request)Returns basic information about the health of the cluster.java.util.concurrent.CompletableFuture<PendingTasksResponse>pendingTasks(java.util.function.Function<PendingTasksRequest.Builder,ObjectBuilder<PendingTasksRequest>> fn)Returns a list of any cluster-level changes (e.g.java.util.concurrent.CompletableFuture<PendingTasksResponse>pendingTasks(PendingTasksRequest request)Returns a list of any cluster-level changes (e.g.java.util.concurrent.CompletableFuture<PutVotingConfigExclusionsResponse>postVotingConfigExclusions(java.util.function.Function<PutVotingConfigExclusionsRequest.Builder,ObjectBuilder<PutVotingConfigExclusionsRequest>> fn)Updates the cluster voting config exclusions by node ids or node names.java.util.concurrent.CompletableFuture<PutVotingConfigExclusionsResponse>postVotingConfigExclusions(PutVotingConfigExclusionsRequest request)Updates the cluster voting config exclusions by node ids or node names.java.util.concurrent.CompletableFuture<PutComponentTemplateResponse>putComponentTemplate(java.util.function.Function<PutComponentTemplateRequest.Builder,ObjectBuilder<PutComponentTemplateRequest>> fn)Creates or updates a component templatejava.util.concurrent.CompletableFuture<PutComponentTemplateResponse>putComponentTemplate(PutComponentTemplateRequest request)Creates or updates a component templatejava.util.concurrent.CompletableFuture<PutSettingsResponse>putSettings(java.util.function.Function<PutSettingsRequest.Builder,ObjectBuilder<PutSettingsRequest>> fn)Updates the cluster settings.java.util.concurrent.CompletableFuture<PutSettingsResponse>putSettings(PutSettingsRequest request)Updates the cluster settings.java.util.concurrent.CompletableFuture<RemoteInfoResponse>remoteInfo(java.util.function.Function<RemoteInfoRequest.Builder,ObjectBuilder<RemoteInfoRequest>> fn)Returns the information about configured remote clusters.java.util.concurrent.CompletableFuture<RemoteInfoResponse>remoteInfo(RemoteInfoRequest request)Returns the information about configured remote clusters.java.util.concurrent.CompletableFuture<RerouteResponse>reroute(java.util.function.Function<RerouteRequest.Builder,ObjectBuilder<RerouteRequest>> fn)Allows to manually change the allocation of individual shards in the cluster.java.util.concurrent.CompletableFuture<RerouteResponse>reroute(RerouteRequest request)Allows to manually change the allocation of individual shards in the cluster.java.util.concurrent.CompletableFuture<StateResponse>state(java.util.function.Function<StateRequest.Builder,ObjectBuilder<StateRequest>> fn)Returns a comprehensive information about the state of the cluster.java.util.concurrent.CompletableFuture<StateResponse>state(StateRequest request)Returns a comprehensive information about the state of the cluster.java.util.concurrent.CompletableFuture<StatsResponse>stats(java.util.function.Function<StatsRequest.Builder,ObjectBuilder<StatsRequest>> fn)Returns high-level overview of cluster statistics.java.util.concurrent.CompletableFuture<StatsResponse>stats(StatsRequest request)Returns high-level overview of cluster statistics.ClusterAsyncClientwithRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newClusterAsyncClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options, inheriting existing options.ClusterAsyncClientwithRequestOptions(org.opensearch.client.RequestOptions options)Creates a newClusterAsyncClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.
-
Constructor Details
-
Method Details
-
allocationExplain
public java.util.concurrent.CompletableFuture<AllocationExplainResponse> allocationExplain(AllocationExplainRequest request) throws java.io.IOExceptionProvides explanations for shard allocations in the cluster.- Throws:
java.io.IOException
-
allocationExplain
public final java.util.concurrent.CompletableFuture<AllocationExplainResponse> allocationExplain(java.util.function.Function<AllocationExplainRequest.Builder,ObjectBuilder<AllocationExplainRequest>> fn) throws java.io.IOExceptionProvides explanations for shard allocations in the cluster.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
deleteComponentTemplate
public java.util.concurrent.CompletableFuture<DeleteComponentTemplateResponse> deleteComponentTemplate(DeleteComponentTemplateRequest request) throws java.io.IOExceptionDeletes a component template- Throws:
java.io.IOException
-
deleteComponentTemplate
public final java.util.concurrent.CompletableFuture<DeleteComponentTemplateResponse> deleteComponentTemplate(java.util.function.Function<DeleteComponentTemplateRequest.Builder,ObjectBuilder<DeleteComponentTemplateRequest>> fn) throws java.io.IOExceptionDeletes a component template- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
deleteVotingConfigExclusions
public java.util.concurrent.CompletableFuture<DeleteVotingConfigExclusionsResponse> deleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequest request) throws java.io.IOExceptionClears cluster voting config exclusions.- Throws:
java.io.IOException
-
deleteVotingConfigExclusions
public final java.util.concurrent.CompletableFuture<DeleteVotingConfigExclusionsResponse> deleteVotingConfigExclusions(java.util.function.Function<DeleteVotingConfigExclusionsRequest.Builder,ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) throws java.io.IOExceptionClears cluster voting config exclusions.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
existsComponentTemplate
public java.util.concurrent.CompletableFuture<ExistsComponentTemplateResponse> existsComponentTemplate(ExistsComponentTemplateRequest request) throws java.io.IOExceptionReturns information about whether a particular component template exist- Throws:
java.io.IOException
-
existsComponentTemplate
public final java.util.concurrent.CompletableFuture<ExistsComponentTemplateResponse> existsComponentTemplate(java.util.function.Function<ExistsComponentTemplateRequest.Builder,ObjectBuilder<ExistsComponentTemplateRequest>> fn) throws java.io.IOExceptionReturns information about whether a particular component template exist- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getComponentTemplate
public java.util.concurrent.CompletableFuture<GetComponentTemplateResponse> getComponentTemplate(GetComponentTemplateRequest request) throws java.io.IOExceptionReturns one or more component templates- Throws:
java.io.IOException
-
getComponentTemplate
public final java.util.concurrent.CompletableFuture<GetComponentTemplateResponse> getComponentTemplate(java.util.function.Function<GetComponentTemplateRequest.Builder,ObjectBuilder<GetComponentTemplateRequest>> fn) throws java.io.IOExceptionReturns one or more component templates- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getSettings
public java.util.concurrent.CompletableFuture<GetSettingsResponse> getSettings(GetSettingsRequest request) throws java.io.IOExceptionReturns cluster settings.- Throws:
java.io.IOException
-
getSettings
public final java.util.concurrent.CompletableFuture<GetSettingsResponse> getSettings(java.util.function.Function<GetSettingsRequest.Builder,ObjectBuilder<GetSettingsRequest>> fn) throws java.io.IOExceptionReturns cluster settings.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
health
public java.util.concurrent.CompletableFuture<HealthResponse> health(HealthRequest request) throws java.io.IOExceptionReturns basic information about the health of the cluster.- Throws:
java.io.IOException
-
health
public final java.util.concurrent.CompletableFuture<HealthResponse> health(java.util.function.Function<HealthRequest.Builder,ObjectBuilder<HealthRequest>> fn) throws java.io.IOExceptionReturns basic information about the health of the cluster.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
pendingTasks
public java.util.concurrent.CompletableFuture<PendingTasksResponse> pendingTasks(PendingTasksRequest request) throws java.io.IOExceptionReturns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.- Throws:
java.io.IOException
-
pendingTasks
public final java.util.concurrent.CompletableFuture<PendingTasksResponse> pendingTasks(java.util.function.Function<PendingTasksRequest.Builder,ObjectBuilder<PendingTasksRequest>> fn) throws java.io.IOExceptionReturns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
postVotingConfigExclusions
public java.util.concurrent.CompletableFuture<PutVotingConfigExclusionsResponse> postVotingConfigExclusions(PutVotingConfigExclusionsRequest request) throws java.io.IOExceptionUpdates the cluster voting config exclusions by node ids or node names.- Throws:
java.io.IOException
-
postVotingConfigExclusions
public final java.util.concurrent.CompletableFuture<PutVotingConfigExclusionsResponse> postVotingConfigExclusions(java.util.function.Function<PutVotingConfigExclusionsRequest.Builder,ObjectBuilder<PutVotingConfigExclusionsRequest>> fn) throws java.io.IOExceptionUpdates the cluster voting config exclusions by node ids or node names.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
putComponentTemplate
public java.util.concurrent.CompletableFuture<PutComponentTemplateResponse> putComponentTemplate(PutComponentTemplateRequest request) throws java.io.IOExceptionCreates or updates a component template- Throws:
java.io.IOException
-
putComponentTemplate
public final java.util.concurrent.CompletableFuture<PutComponentTemplateResponse> putComponentTemplate(java.util.function.Function<PutComponentTemplateRequest.Builder,ObjectBuilder<PutComponentTemplateRequest>> fn) throws java.io.IOExceptionCreates or updates a component template- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
putSettings
public java.util.concurrent.CompletableFuture<PutSettingsResponse> putSettings(PutSettingsRequest request) throws java.io.IOExceptionUpdates the cluster settings.- Throws:
java.io.IOException
-
putSettings
public final java.util.concurrent.CompletableFuture<PutSettingsResponse> putSettings(java.util.function.Function<PutSettingsRequest.Builder,ObjectBuilder<PutSettingsRequest>> fn) throws java.io.IOExceptionUpdates the cluster settings.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
remoteInfo
public java.util.concurrent.CompletableFuture<RemoteInfoResponse> remoteInfo(RemoteInfoRequest request) throws java.io.IOExceptionReturns the information about configured remote clusters.- Throws:
java.io.IOException
-
remoteInfo
public final java.util.concurrent.CompletableFuture<RemoteInfoResponse> remoteInfo(java.util.function.Function<RemoteInfoRequest.Builder,ObjectBuilder<RemoteInfoRequest>> fn) throws java.io.IOExceptionReturns the information about configured remote clusters.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
reroute
public java.util.concurrent.CompletableFuture<RerouteResponse> reroute(RerouteRequest request) throws java.io.IOExceptionAllows to manually change the allocation of individual shards in the cluster.- Throws:
java.io.IOException
-
reroute
public final java.util.concurrent.CompletableFuture<RerouteResponse> reroute(java.util.function.Function<RerouteRequest.Builder,ObjectBuilder<RerouteRequest>> fn) throws java.io.IOExceptionAllows to manually change the allocation of individual shards in the cluster.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
state
public java.util.concurrent.CompletableFuture<StateResponse> state(StateRequest request) throws java.io.IOExceptionReturns a comprehensive information about the state of the cluster.- Throws:
java.io.IOException
-
state
public final java.util.concurrent.CompletableFuture<StateResponse> state(java.util.function.Function<StateRequest.Builder,ObjectBuilder<StateRequest>> fn) throws java.io.IOExceptionReturns a comprehensive information about the state of the cluster.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
stats
public java.util.concurrent.CompletableFuture<StatsResponse> stats(StatsRequest request) throws java.io.IOExceptionReturns high-level overview of cluster statistics.- Throws:
java.io.IOException
-
stats
public final java.util.concurrent.CompletableFuture<StatsResponse> stats(java.util.function.Function<StatsRequest.Builder,ObjectBuilder<StatsRequest>> fn) throws java.io.IOExceptionReturns high-level overview of cluster statistics.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
withRequestOptions
public ClusterAsyncClient withRequestOptions(@Nullable org.opensearch.client.RequestOptions options)Creates a newClusterAsyncClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.- Specified by:
withRequestOptionsin classApiClient<ClusterAsyncClient>
-
withRequestOptions
public ClusterAsyncClient withRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newClusterAsyncClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options, inheriting existing options.- Parameters:
fn- a function taking an options builder initialized with the current request options, or initialized with default values.
-