Class ElasticsearchClusterClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchClusterClient>
co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterClient
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ElasticsearchClusterClient
extends ApiClient<ElasticsearchTransport,ElasticsearchClusterClient>
Client for the cluster namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchClusterClient(ElasticsearchTransport transport) ElasticsearchClusterClient(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.Deletes a component templatedeleteComponentTemplate(Function<DeleteComponentTemplateRequest.Builder, ObjectBuilder<DeleteComponentTemplateRequest>> fn) Deletes a component templateClears cluster voting config exclusions.Clears cluster voting config exclusions.final BooleanResponsedeleteVotingConfigExclusions(Function<DeleteVotingConfigExclusionsRequest.Builder, ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) Clears cluster voting config exclusions.Returns information about whether a particular component template existfinal BooleanResponseexistsComponentTemplate(Function<ExistsComponentTemplateRequest.Builder, ObjectBuilder<ExistsComponentTemplateRequest>> fn) Returns information about whether a particular component template existReturns one or more component templatesReturns one or more component templatesgetComponentTemplate(Function<GetComponentTemplateRequest.Builder, ObjectBuilder<GetComponentTemplateRequest>> fn) Returns one or more component templatesReturns cluster settings.getSettings(GetClusterSettingsRequest request) Returns cluster settings.getSettings(Function<GetClusterSettingsRequest.Builder, ObjectBuilder<GetClusterSettingsRequest>> fn) Returns cluster settings.health()Returns basic information about the health of the cluster.health(HealthRequest request) Returns basic information about the health of the cluster.final HealthResponseReturns basic information about the health of the cluster.Returns a list of any cluster-level changes (e.g.pendingTasks(PendingTasksRequest request) Returns a list of any cluster-level changes (e.g.final PendingTasksResponseReturns a list of any cluster-level changes (e.g.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 BooleanResponsepostVotingConfigExclusions(Function<PostVotingConfigExclusionsRequest.Builder, ObjectBuilder<PostVotingConfigExclusionsRequest>> fn) Updates the cluster voting config exclusions by node ids or node names.Creates or updates a component templateputComponentTemplate(Function<PutComponentTemplateRequest.Builder, ObjectBuilder<PutComponentTemplateRequest>> fn) Creates or updates a component templateUpdates the cluster settings.putSettings(PutClusterSettingsRequest request) Updates the cluster settings.putSettings(Function<PutClusterSettingsRequest.Builder, ObjectBuilder<PutClusterSettingsRequest>> fn) Updates the cluster settings.Returns the information about configured remote clusters.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 RerouteResponseAllows 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 StateResponseReturns a comprehensive information about the state of the cluster.stats()Returns high-level overview of cluster statistics.stats(ClusterStatsRequest request) Returns high-level overview of cluster statistics.final ClusterStatsResponseReturns high-level overview of 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
-
ElasticsearchClusterClient
-
ElasticsearchClusterClient
public ElasticsearchClusterClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchClusterClient>
-
allocationExplain
public AllocationExplainResponse allocationExplain(AllocationExplainRequest request) throws IOException, ElasticsearchException Provides explanations for shard allocations in the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
allocationExplain
public final AllocationExplainResponse allocationExplain(Function<AllocationExplainRequest.Builder, ObjectBuilder<AllocationExplainRequest>> fn) throws IOException, ElasticsearchExceptionProvides explanations for shard allocations in the cluster.- Parameters:
fn- a function that initializes a builder to create theAllocationExplainRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
allocationExplain
Provides explanations for shard allocations in the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteComponentTemplate
public DeleteComponentTemplateResponse deleteComponentTemplate(DeleteComponentTemplateRequest request) throws IOException, ElasticsearchException Deletes a component template- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteComponentTemplate
public final DeleteComponentTemplateResponse deleteComponentTemplate(Function<DeleteComponentTemplateRequest.Builder, ObjectBuilder<DeleteComponentTemplateRequest>> fn) throws IOException, ElasticsearchExceptionDeletes a component template- Parameters:
fn- a function that initializes a builder to create theDeleteComponentTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteVotingConfigExclusions
public BooleanResponse deleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequest request) throws IOException, ElasticsearchException Clears cluster voting config exclusions.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteVotingConfigExclusions
public final BooleanResponse deleteVotingConfigExclusions(Function<DeleteVotingConfigExclusionsRequest.Builder, ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) throws IOException, ElasticsearchExceptionClears cluster voting config exclusions.- Parameters:
fn- a function that initializes a builder to create theDeleteVotingConfigExclusionsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteVotingConfigExclusions
Clears cluster voting config exclusions.- Throws:
IOExceptionElasticsearchException- See Also:
-
existsComponentTemplate
public BooleanResponse existsComponentTemplate(ExistsComponentTemplateRequest request) throws IOException, ElasticsearchException Returns information about whether a particular component template exist- Throws:
IOExceptionElasticsearchException- See Also:
-
existsComponentTemplate
public final BooleanResponse existsComponentTemplate(Function<ExistsComponentTemplateRequest.Builder, ObjectBuilder<ExistsComponentTemplateRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about whether a particular component template exist- Parameters:
fn- a function that initializes a builder to create theExistsComponentTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getComponentTemplate
public GetComponentTemplateResponse getComponentTemplate(GetComponentTemplateRequest request) throws IOException, ElasticsearchException Returns one or more component templates- Throws:
IOExceptionElasticsearchException- See Also:
-
getComponentTemplate
public final GetComponentTemplateResponse getComponentTemplate(Function<GetComponentTemplateRequest.Builder, ObjectBuilder<GetComponentTemplateRequest>> fn) throws IOException, ElasticsearchExceptionReturns one or more component templates- Parameters:
fn- a function that initializes a builder to create theGetComponentTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getComponentTemplate
public GetComponentTemplateResponse getComponentTemplate() throws IOException, ElasticsearchExceptionReturns one or more component templates- Throws:
IOExceptionElasticsearchException- See Also:
-
getSettings
public GetClusterSettingsResponse getSettings(GetClusterSettingsRequest request) throws IOException, ElasticsearchException Returns cluster settings.- Throws:
IOExceptionElasticsearchException- See Also:
-
getSettings
public final GetClusterSettingsResponse getSettings(Function<GetClusterSettingsRequest.Builder, ObjectBuilder<GetClusterSettingsRequest>> fn) throws IOException, ElasticsearchExceptionReturns cluster settings.- Parameters:
fn- a function that initializes a builder to create theGetClusterSettingsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getSettings
Returns cluster settings.- Throws:
IOExceptionElasticsearchException- See Also:
-
health
Returns basic information about the health of the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
health
public final HealthResponse health(Function<HealthRequest.Builder, ObjectBuilder<HealthRequest>> fn) throws IOException, ElasticsearchExceptionReturns basic information about the health of the cluster.- Parameters:
fn- a function that initializes a builder to create theHealthRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
health
Returns basic information about the health of the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
pendingTasks
public PendingTasksResponse pendingTasks(PendingTasksRequest request) throws IOException, ElasticsearchException Returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.- Throws:
IOExceptionElasticsearchException- See Also:
-
pendingTasks
public final PendingTasksResponse pendingTasks(Function<PendingTasksRequest.Builder, ObjectBuilder<PendingTasksRequest>> fn) throws IOException, ElasticsearchExceptionReturns 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 builder to create thePendingTasksRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
pendingTasks
Returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.- Throws:
IOExceptionElasticsearchException- See Also:
-
postVotingConfigExclusions
public BooleanResponse postVotingConfigExclusions(PostVotingConfigExclusionsRequest request) throws IOException, ElasticsearchException Updates the cluster voting config exclusions by node ids or node names.- Throws:
IOExceptionElasticsearchException- See Also:
-
postVotingConfigExclusions
public final BooleanResponse postVotingConfigExclusions(Function<PostVotingConfigExclusionsRequest.Builder, ObjectBuilder<PostVotingConfigExclusionsRequest>> fn) throws IOException, ElasticsearchExceptionUpdates the cluster voting config exclusions by node ids or node names.- Parameters:
fn- a function that initializes a builder to create thePostVotingConfigExclusionsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
postVotingConfigExclusions
Updates the cluster voting config exclusions by node ids or node names.- Throws:
IOExceptionElasticsearchException- See Also:
-
putComponentTemplate
public PutComponentTemplateResponse putComponentTemplate(PutComponentTemplateRequest request) throws IOException, ElasticsearchException Creates or updates a component template- Throws:
IOExceptionElasticsearchException- See Also:
-
putComponentTemplate
public final PutComponentTemplateResponse putComponentTemplate(Function<PutComponentTemplateRequest.Builder, ObjectBuilder<PutComponentTemplateRequest>> fn) throws IOException, ElasticsearchExceptionCreates or updates a component template- Parameters:
fn- a function that initializes a builder to create thePutComponentTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putSettings
public PutClusterSettingsResponse putSettings(PutClusterSettingsRequest request) throws IOException, ElasticsearchException Updates the cluster settings.- Throws:
IOExceptionElasticsearchException- See Also:
-
putSettings
public final PutClusterSettingsResponse putSettings(Function<PutClusterSettingsRequest.Builder, ObjectBuilder<PutClusterSettingsRequest>> fn) throws IOException, ElasticsearchExceptionUpdates the cluster settings.- Parameters:
fn- a function that initializes a builder to create thePutClusterSettingsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putSettings
Updates the cluster settings.- Throws:
IOExceptionElasticsearchException- See Also:
-
remoteInfo
Returns the information about configured remote clusters.- Throws:
IOExceptionElasticsearchException- See Also:
-
reroute
Allows to manually change the allocation of individual shards in the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
reroute
public final RerouteResponse reroute(Function<RerouteRequest.Builder, ObjectBuilder<RerouteRequest>> fn) throws IOException, ElasticsearchExceptionAllows to manually change the allocation of individual shards in the cluster.- Parameters:
fn- a function that initializes a builder to create theRerouteRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
reroute
Allows to manually change the allocation of individual shards in the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
state
Returns a comprehensive information about the state of the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
state
public final StateResponse state(Function<StateRequest.Builder, ObjectBuilder<StateRequest>> fn) throws IOException, ElasticsearchExceptionReturns a comprehensive information about the state of the cluster.- Parameters:
fn- a function that initializes a builder to create theStateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
state
Returns a comprehensive information about the state of the cluster.- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
public ClusterStatsResponse stats(ClusterStatsRequest request) throws IOException, ElasticsearchException Returns high-level overview of cluster statistics.- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
public final ClusterStatsResponse stats(Function<ClusterStatsRequest.Builder, ObjectBuilder<ClusterStatsRequest>> fn) throws IOException, ElasticsearchExceptionReturns high-level overview of cluster statistics.- Parameters:
fn- a function that initializes a builder to create theClusterStatsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
Returns high-level overview of cluster statistics.- Throws:
IOExceptionElasticsearchException- See Also:
-