Class ElasticsearchClusterAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchClusterAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionProvides explanations for shard allocations in the cluster.Provides explanations for shard allocations in the cluster.allocationExplain
(Function<AllocationExplainRequest.Builder, ObjectBuilder<AllocationExplainRequest>> fn) Provides explanations for shard allocations in the cluster.Delete component templates.deleteComponentTemplate
(Function<DeleteComponentTemplateRequest.Builder, ObjectBuilder<DeleteComponentTemplateRequest>> fn) Delete component templates.Clears cluster voting config exclusions.Clears cluster voting config exclusions.final CompletableFuture<BooleanResponse>
deleteVotingConfigExclusions
(Function<DeleteVotingConfigExclusionsRequest.Builder, ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) Clears cluster voting config exclusions.Check component templates.final CompletableFuture<BooleanResponse>
existsComponentTemplate
(Function<ExistsComponentTemplateRequest.Builder, ObjectBuilder<ExistsComponentTemplateRequest>> fn) Check component templates.Get component templates.Get component templates.getComponentTemplate
(Function<GetComponentTemplateRequest.Builder, ObjectBuilder<GetComponentTemplateRequest>> fn) Get component templates.Returns cluster-wide settings.getSettings
(GetClusterSettingsRequest request) Returns cluster-wide settings.getSettings
(Function<GetClusterSettingsRequest.Builder, ObjectBuilder<GetClusterSettingsRequest>> fn) Returns cluster-wide settings.health()
The cluster health API returns a simple status on the health of the cluster.health
(HealthRequest request) The cluster health API returns a simple status on the health of the cluster.final CompletableFuture<HealthResponse>
The cluster health API returns a simple status on the health of the cluster.info
(ClusterInfoRequest request) Get cluster info.Get cluster info.Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed.pendingTasks
(PendingTasksRequest request) Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed.Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed.Updates the cluster voting config exclusions by node ids or node names.Updates the cluster voting config exclusions by node ids or node names.final CompletableFuture<BooleanResponse>
postVotingConfigExclusions
(Function<PostVotingConfigExclusionsRequest.Builder, ObjectBuilder<PostVotingConfigExclusionsRequest>> fn) Updates the cluster voting config exclusions by node ids or node names.Create or update a component template.putComponentTemplate
(Function<PutComponentTemplateRequest.Builder, ObjectBuilder<PutComponentTemplateRequest>> fn) Create or update a component template.Updates the cluster settings.putSettings
(PutClusterSettingsRequest request) Updates the cluster settings.putSettings
(Function<PutClusterSettingsRequest.Builder, ObjectBuilder<PutClusterSettingsRequest>> fn) Updates the cluster settings.The cluster remote info API allows you to retrieve all of the configured remote cluster information.reroute()
Allows to manually change the allocation of individual shards in the cluster.reroute
(RerouteRequest request) Allows to manually change the allocation of individual shards in the cluster.final CompletableFuture<RerouteResponse>
Allows to manually change the allocation of individual shards in the cluster.state()
Returns a comprehensive information about the state of the cluster.state
(StateRequest request) Returns a comprehensive information about the state of the cluster.final CompletableFuture<StateResponse>
Returns a comprehensive information about the state of the cluster.stats()
Returns cluster statistics.stats
(ClusterStatsRequest request) Returns cluster statistics.Returns cluster statistics.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchClusterAsyncClient
-
ElasticsearchClusterAsyncClient
public ElasticsearchClusterAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchClusterAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchClusterAsyncClient>
-
allocationExplain
public CompletableFuture<AllocationExplainResponse> allocationExplain(AllocationExplainRequest request) Provides explanations for shard allocations in the cluster.- See Also:
-
allocationExplain
public final CompletableFuture<AllocationExplainResponse> allocationExplain(Function<AllocationExplainRequest.Builder, ObjectBuilder<AllocationExplainRequest>> fn) Provides explanations for shard allocations in the cluster.- Parameters:
fn
- a function that initializes a builder to create theAllocationExplainRequest
- See Also:
-
allocationExplain
Provides explanations for shard allocations in the cluster.- See Also:
-
deleteComponentTemplate
public CompletableFuture<DeleteComponentTemplateResponse> deleteComponentTemplate(DeleteComponentTemplateRequest request) Delete component templates. Deletes component templates. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.- See Also:
-
deleteComponentTemplate
public final CompletableFuture<DeleteComponentTemplateResponse> deleteComponentTemplate(Function<DeleteComponentTemplateRequest.Builder, ObjectBuilder<DeleteComponentTemplateRequest>> fn) Delete component templates. Deletes component templates. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.- Parameters:
fn
- a function that initializes a builder to create theDeleteComponentTemplateRequest
- See Also:
-
deleteVotingConfigExclusions
public CompletableFuture<BooleanResponse> deleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequest request) Clears cluster voting config exclusions.- See Also:
-
deleteVotingConfigExclusions
public final CompletableFuture<BooleanResponse> deleteVotingConfigExclusions(Function<DeleteVotingConfigExclusionsRequest.Builder, ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) Clears cluster voting config exclusions.- Parameters:
fn
- a function that initializes a builder to create theDeleteVotingConfigExclusionsRequest
- See Also:
-
deleteVotingConfigExclusions
Clears cluster voting config exclusions.- See Also:
-
existsComponentTemplate
public CompletableFuture<BooleanResponse> existsComponentTemplate(ExistsComponentTemplateRequest request) Check component templates. Returns information about whether a particular component template exists.- See Also:
-
existsComponentTemplate
public final CompletableFuture<BooleanResponse> existsComponentTemplate(Function<ExistsComponentTemplateRequest.Builder, ObjectBuilder<ExistsComponentTemplateRequest>> fn) Check component templates. Returns information about whether a particular component template exists.- Parameters:
fn
- a function that initializes a builder to create theExistsComponentTemplateRequest
- See Also:
-
getComponentTemplate
public CompletableFuture<GetComponentTemplateResponse> getComponentTemplate(GetComponentTemplateRequest request) Get component templates. Retrieves information about component templates.- See Also:
-
getComponentTemplate
public final CompletableFuture<GetComponentTemplateResponse> getComponentTemplate(Function<GetComponentTemplateRequest.Builder, ObjectBuilder<GetComponentTemplateRequest>> fn) Get component templates. Retrieves information about component templates.- Parameters:
fn
- a function that initializes a builder to create theGetComponentTemplateRequest
- See Also:
-
getComponentTemplate
Get component templates. Retrieves information about component templates.- See Also:
-
getSettings
Returns cluster-wide settings. By default, it returns only settings that have been explicitly defined.- See Also:
-
getSettings
public final CompletableFuture<GetClusterSettingsResponse> getSettings(Function<GetClusterSettingsRequest.Builder, ObjectBuilder<GetClusterSettingsRequest>> fn) Returns cluster-wide settings. By default, it returns only settings that have been explicitly defined.- Parameters:
fn
- a function that initializes a builder to create theGetClusterSettingsRequest
- See Also:
-
getSettings
Returns cluster-wide settings. By default, it returns only settings that have been explicitly defined.- See Also:
-
health
The cluster health API returns a simple status on the health of the cluster. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices. The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.- See Also:
-
health
public final CompletableFuture<HealthResponse> health(Function<HealthRequest.Builder, ObjectBuilder<HealthRequest>> fn) The cluster health API returns a simple status on the health of the cluster. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices. The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.- Parameters:
fn
- a function that initializes a builder to create theHealthRequest
- See Also:
-
health
The cluster health API returns a simple status on the health of the cluster. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices. The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.- See Also:
-
info
Get cluster info. Returns basic information about the cluster.- See Also:
-
info
public final CompletableFuture<ClusterInfoResponse> info(Function<ClusterInfoRequest.Builder, ObjectBuilder<ClusterInfoRequest>> fn) Get cluster info. Returns basic information about the cluster.- Parameters:
fn
- a function that initializes a builder to create theClusterInfoRequest
- See Also:
-
pendingTasks
Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed. NOTE: This API returns a list of any pending updates to the cluster state. These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.- See Also:
-
pendingTasks
public final CompletableFuture<PendingTasksResponse> pendingTasks(Function<PendingTasksRequest.Builder, ObjectBuilder<PendingTasksRequest>> fn) Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed. NOTE: This API returns a list of any pending updates to the cluster state. These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.- Parameters:
fn
- a function that initializes a builder to create thePendingTasksRequest
- See Also:
-
pendingTasks
Returns cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet been executed. NOTE: This API returns a list of any pending updates to the cluster state. These are distinct from the tasks reported by the Task Management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.- See Also:
-
postVotingConfigExclusions
public CompletableFuture<BooleanResponse> postVotingConfigExclusions(PostVotingConfigExclusionsRequest request) Updates the cluster voting config exclusions by node ids or node names.- See Also:
-
postVotingConfigExclusions
public final CompletableFuture<BooleanResponse> postVotingConfigExclusions(Function<PostVotingConfigExclusionsRequest.Builder, ObjectBuilder<PostVotingConfigExclusionsRequest>> fn) Updates the cluster voting config exclusions by node ids or node names.- Parameters:
fn
- a function that initializes a builder to create thePostVotingConfigExclusionsRequest
- See Also:
-
postVotingConfigExclusions
Updates the cluster voting config exclusions by node ids or node names.- See Also:
-
putComponentTemplate
public CompletableFuture<PutComponentTemplateResponse> putComponentTemplate(PutComponentTemplateRequest request) Create or update a component template. Creates or updates a component template. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.An index template can be composed of multiple component templates. To use a component template, specify it in an index template’s
composed_of
list. Component templates are only applied to new data streams and indices as part of a matching index template.Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.
Component templates are only used during index creation. For data streams, this includes data stream creation and the creation of a stream’s backing indices. Changes to component templates do not affect existing indices, including a stream’s backing indices.
You can use C-style
/* *\/
block comments in component templates. You can include comments anywhere in the request body except before the opening curly bracket.- See Also:
-
putComponentTemplate
public final CompletableFuture<PutComponentTemplateResponse> putComponentTemplate(Function<PutComponentTemplateRequest.Builder, ObjectBuilder<PutComponentTemplateRequest>> fn) Create or update a component template. Creates or updates a component template. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.An index template can be composed of multiple component templates. To use a component template, specify it in an index template’s
composed_of
list. Component templates are only applied to new data streams and indices as part of a matching index template.Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.
Component templates are only used during index creation. For data streams, this includes data stream creation and the creation of a stream’s backing indices. Changes to component templates do not affect existing indices, including a stream’s backing indices.
You can use C-style
/* *\/
block comments in component templates. You can include comments anywhere in the request body except before the opening curly bracket.- Parameters:
fn
- a function that initializes a builder to create thePutComponentTemplateRequest
- See Also:
-
putSettings
Updates the cluster settings.- See Also:
-
putSettings
public final CompletableFuture<PutClusterSettingsResponse> putSettings(Function<PutClusterSettingsRequest.Builder, ObjectBuilder<PutClusterSettingsRequest>> fn) Updates the cluster settings.- Parameters:
fn
- a function that initializes a builder to create thePutClusterSettingsRequest
- See Also:
-
putSettings
Updates the cluster settings.- See Also:
-
remoteInfo
The cluster remote info API allows you to retrieve all of the configured remote cluster information. It returns connection and endpoint information keyed by the configured remote cluster alias.- See Also:
-
reroute
Allows to manually change the allocation of individual shards in the cluster.- See Also:
-
reroute
public final CompletableFuture<RerouteResponse> reroute(Function<RerouteRequest.Builder, ObjectBuilder<RerouteRequest>> fn) Allows to manually change the allocation of individual shards in the cluster.- Parameters:
fn
- a function that initializes a builder to create theRerouteRequest
- See Also:
-
reroute
Allows to manually change the allocation of individual shards in the cluster.- See Also:
-
state
Returns a comprehensive information about the state of the cluster.- See Also:
-
state
public final CompletableFuture<StateResponse> state(Function<StateRequest.Builder, ObjectBuilder<StateRequest>> fn) Returns a comprehensive information about the state of the cluster.- Parameters:
fn
- a function that initializes a builder to create theStateRequest
- See Also:
-
state
Returns a comprehensive information about the state of the cluster.- See Also:
-
stats
Returns cluster statistics. It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).- See Also:
-
stats
public final CompletableFuture<ClusterStatsResponse> stats(Function<ClusterStatsRequest.Builder, ObjectBuilder<ClusterStatsRequest>> fn) Returns cluster statistics. It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).- Parameters:
fn
- a function that initializes a builder to create theClusterStatsRequest
- See Also:
-
stats
Returns cluster statistics. It returns basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).- See Also:
-