Class ElasticsearchCcrAsyncClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchCcrAsyncClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionDelete auto-follow patterns.deleteAutoFollowPattern
(Function<DeleteAutoFollowPatternRequest.Builder, ObjectBuilder<DeleteAutoFollowPatternRequest>> fn) Delete auto-follow patterns.follow
(FollowRequest request) Create a follower.final CompletableFuture<FollowResponse>
Create a follower.followInfo
(FollowInfoRequest request) Get follower information.Get follower information.followStats
(FollowStatsRequest request) Get follower stats.Get follower stats.forgetFollower
(ForgetFollowerRequest request) Forget a follower.Forget a follower.Get auto-follow patterns.Get auto-follow patterns.getAutoFollowPattern
(Function<GetAutoFollowPatternRequest.Builder, ObjectBuilder<GetAutoFollowPatternRequest>> fn) Get auto-follow patterns.Pause an auto-follow pattern.pauseAutoFollowPattern
(Function<PauseAutoFollowPatternRequest.Builder, ObjectBuilder<PauseAutoFollowPatternRequest>> fn) Pause an auto-follow pattern.pauseFollow
(PauseFollowRequest request) Pause a follower.Pause a follower.Create or update auto-follow patterns.putAutoFollowPattern
(Function<PutAutoFollowPatternRequest.Builder, ObjectBuilder<PutAutoFollowPatternRequest>> fn) Create or update auto-follow patterns.Resume an auto-follow pattern.resumeAutoFollowPattern
(Function<ResumeAutoFollowPatternRequest.Builder, ObjectBuilder<ResumeAutoFollowPatternRequest>> fn) Resume an auto-follow pattern.resumeFollow
(ResumeFollowRequest request) Resume a follower.Resume a follower.stats()
Get cross-cluster replication stats.stats
(CcrStatsRequest request) Get cross-cluster replication stats.Get cross-cluster replication stats.unfollow
(UnfollowRequest request) Unfollow an index.Unfollow an index.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
-
ElasticsearchCcrAsyncClient
-
ElasticsearchCcrAsyncClient
public ElasticsearchCcrAsyncClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchCcrAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchCcrAsyncClient>
-
deleteAutoFollowPattern
public CompletableFuture<DeleteAutoFollowPatternResponse> deleteAutoFollowPattern(DeleteAutoFollowPatternRequest request) Delete auto-follow patterns.Delete a collection of cross-cluster replication auto-follow patterns.
- See Also:
-
deleteAutoFollowPattern
public final CompletableFuture<DeleteAutoFollowPatternResponse> deleteAutoFollowPattern(Function<DeleteAutoFollowPatternRequest.Builder, ObjectBuilder<DeleteAutoFollowPatternRequest>> fn) Delete auto-follow patterns.Delete a collection of cross-cluster replication auto-follow patterns.
- Parameters:
fn
- a function that initializes a builder to create theDeleteAutoFollowPatternRequest
- See Also:
-
follow
Create a follower. Create a cross-cluster replication follower index that follows a specific leader index. When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.- See Also:
-
follow
public final CompletableFuture<FollowResponse> follow(Function<FollowRequest.Builder, ObjectBuilder<FollowRequest>> fn) Create a follower. Create a cross-cluster replication follower index that follows a specific leader index. When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.- Parameters:
fn
- a function that initializes a builder to create theFollowRequest
- See Also:
-
followInfo
Get follower information.Get information about all cross-cluster replication follower indices. For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.
- See Also:
-
followInfo
public final CompletableFuture<FollowInfoResponse> followInfo(Function<FollowInfoRequest.Builder, ObjectBuilder<FollowInfoRequest>> fn) Get follower information.Get information about all cross-cluster replication follower indices. For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.
- Parameters:
fn
- a function that initializes a builder to create theFollowInfoRequest
- See Also:
-
followStats
Get follower stats.Get cross-cluster replication follower stats. The API returns shard-level stats about the "following tasks" associated with each shard for the specified indices.
- See Also:
-
followStats
public final CompletableFuture<FollowStatsResponse> followStats(Function<FollowStatsRequest.Builder, ObjectBuilder<FollowStatsRequest>> fn) Get follower stats.Get cross-cluster replication follower stats. The API returns shard-level stats about the "following tasks" associated with each shard for the specified indices.
- Parameters:
fn
- a function that initializes a builder to create theFollowStatsRequest
- See Also:
-
forgetFollower
Forget a follower. Remove the cross-cluster replication follower retention leases from the leader.A following index takes out retention leases on its leader index. These leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication. When a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed. However, removal of the leases can fail, for example when the remote cluster containing the leader index is unavailable. While the leases will eventually expire on their own, their extended existence can cause the leader index to hold more history than necessary and prevent index lifecycle management from performing some operations on the leader index. This API exists to enable manually removing the leases when the unfollow API is unable to do so.
NOTE: This API does not stop replication by a following index. If you use this API with a follower index that is still actively following, the following index will add back retention leases on the leader. The only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked.
- See Also:
-
forgetFollower
public final CompletableFuture<ForgetFollowerResponse> forgetFollower(Function<ForgetFollowerRequest.Builder, ObjectBuilder<ForgetFollowerRequest>> fn) Forget a follower. Remove the cross-cluster replication follower retention leases from the leader.A following index takes out retention leases on its leader index. These leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication. When a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed. However, removal of the leases can fail, for example when the remote cluster containing the leader index is unavailable. While the leases will eventually expire on their own, their extended existence can cause the leader index to hold more history than necessary and prevent index lifecycle management from performing some operations on the leader index. This API exists to enable manually removing the leases when the unfollow API is unable to do so.
NOTE: This API does not stop replication by a following index. If you use this API with a follower index that is still actively following, the following index will add back retention leases on the leader. The only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked.
- Parameters:
fn
- a function that initializes a builder to create theForgetFollowerRequest
- See Also:
-
getAutoFollowPattern
public CompletableFuture<GetAutoFollowPatternResponse> getAutoFollowPattern(GetAutoFollowPatternRequest request) Get auto-follow patterns.Get cross-cluster replication auto-follow patterns.
- See Also:
-
getAutoFollowPattern
public final CompletableFuture<GetAutoFollowPatternResponse> getAutoFollowPattern(Function<GetAutoFollowPatternRequest.Builder, ObjectBuilder<GetAutoFollowPatternRequest>> fn) Get auto-follow patterns.Get cross-cluster replication auto-follow patterns.
- Parameters:
fn
- a function that initializes a builder to create theGetAutoFollowPatternRequest
- See Also:
-
getAutoFollowPattern
Get auto-follow patterns.Get cross-cluster replication auto-follow patterns.
- See Also:
-
pauseAutoFollowPattern
public CompletableFuture<PauseAutoFollowPatternResponse> pauseAutoFollowPattern(PauseAutoFollowPatternRequest request) Pause an auto-follow pattern.Pause a cross-cluster replication auto-follow pattern. When the API returns, the auto-follow pattern is inactive. New indices that are created on the remote cluster and match the auto-follow patterns are ignored.
You can resume auto-following with the resume auto-follow pattern API. When it resumes, the auto-follow pattern is active again and automatically configures follower indices for newly created indices on the remote cluster that match its patterns. Remote indices that were created while the pattern was paused will also be followed, unless they have been deleted or closed in the interim.
- See Also:
-
pauseAutoFollowPattern
public final CompletableFuture<PauseAutoFollowPatternResponse> pauseAutoFollowPattern(Function<PauseAutoFollowPatternRequest.Builder, ObjectBuilder<PauseAutoFollowPatternRequest>> fn) Pause an auto-follow pattern.Pause a cross-cluster replication auto-follow pattern. When the API returns, the auto-follow pattern is inactive. New indices that are created on the remote cluster and match the auto-follow patterns are ignored.
You can resume auto-following with the resume auto-follow pattern API. When it resumes, the auto-follow pattern is active again and automatically configures follower indices for newly created indices on the remote cluster that match its patterns. Remote indices that were created while the pattern was paused will also be followed, unless they have been deleted or closed in the interim.
- Parameters:
fn
- a function that initializes a builder to create thePauseAutoFollowPatternRequest
- See Also:
-
pauseFollow
Pause a follower.Pause a cross-cluster replication follower index. The follower index will not fetch any additional operations from the leader index. You can resume following with the resume follower API. You can pause and resume a follower index to change the configuration of the following task.
- See Also:
-
pauseFollow
public final CompletableFuture<PauseFollowResponse> pauseFollow(Function<PauseFollowRequest.Builder, ObjectBuilder<PauseFollowRequest>> fn) Pause a follower.Pause a cross-cluster replication follower index. The follower index will not fetch any additional operations from the leader index. You can resume following with the resume follower API. You can pause and resume a follower index to change the configuration of the following task.
- Parameters:
fn
- a function that initializes a builder to create thePauseFollowRequest
- See Also:
-
putAutoFollowPattern
public CompletableFuture<PutAutoFollowPatternResponse> putAutoFollowPattern(PutAutoFollowPatternRequest request) Create or update auto-follow patterns. Create a collection of cross-cluster replication auto-follow patterns for a remote cluster. Newly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices. Indices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern.This API can also be used to update auto-follow patterns. NOTE: Follower indices that were configured automatically before updating an auto-follow pattern will remain unchanged even if they do not match against the new patterns.
- See Also:
-
putAutoFollowPattern
public final CompletableFuture<PutAutoFollowPatternResponse> putAutoFollowPattern(Function<PutAutoFollowPatternRequest.Builder, ObjectBuilder<PutAutoFollowPatternRequest>> fn) Create or update auto-follow patterns. Create a collection of cross-cluster replication auto-follow patterns for a remote cluster. Newly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices. Indices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern.This API can also be used to update auto-follow patterns. NOTE: Follower indices that were configured automatically before updating an auto-follow pattern will remain unchanged even if they do not match against the new patterns.
- Parameters:
fn
- a function that initializes a builder to create thePutAutoFollowPatternRequest
- See Also:
-
resumeAutoFollowPattern
public CompletableFuture<ResumeAutoFollowPatternResponse> resumeAutoFollowPattern(ResumeAutoFollowPatternRequest request) Resume an auto-follow pattern.Resume a cross-cluster replication auto-follow pattern that was paused. The auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster. Remote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.
- See Also:
-
resumeAutoFollowPattern
public final CompletableFuture<ResumeAutoFollowPatternResponse> resumeAutoFollowPattern(Function<ResumeAutoFollowPatternRequest.Builder, ObjectBuilder<ResumeAutoFollowPatternRequest>> fn) Resume an auto-follow pattern.Resume a cross-cluster replication auto-follow pattern that was paused. The auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster. Remote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.
- Parameters:
fn
- a function that initializes a builder to create theResumeAutoFollowPatternRequest
- See Also:
-
resumeFollow
Resume a follower. Resume a cross-cluster replication follower index that was paused. The follower index could have been paused with the pause follower API. Alternatively it could be paused due to replication that cannot be retried due to failures during following tasks. When this API returns, the follower index will resume fetching operations from the leader index.- See Also:
-
resumeFollow
public final CompletableFuture<ResumeFollowResponse> resumeFollow(Function<ResumeFollowRequest.Builder, ObjectBuilder<ResumeFollowRequest>> fn) Resume a follower. Resume a cross-cluster replication follower index that was paused. The follower index could have been paused with the pause follower API. Alternatively it could be paused due to replication that cannot be retried due to failures during following tasks. When this API returns, the follower index will resume fetching operations from the leader index.- Parameters:
fn
- a function that initializes a builder to create theResumeFollowRequest
- See Also:
-
stats
Get cross-cluster replication stats.This API returns stats about auto-following and the same shard-level stats as the get follower stats API.
- See Also:
-
stats
public final CompletableFuture<CcrStatsResponse> stats(Function<CcrStatsRequest.Builder, ObjectBuilder<CcrStatsRequest>> fn) Get cross-cluster replication stats.This API returns stats about auto-following and the same shard-level stats as the get follower stats API.
- Parameters:
fn
- a function that initializes a builder to create theCcrStatsRequest
- See Also:
-
stats
Get cross-cluster replication stats.This API returns stats about auto-following and the same shard-level stats as the get follower stats API.
- See Also:
-
unfollow
Unfollow an index.Convert a cross-cluster replication follower index to a regular index. The API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. The follower index must be paused and closed before you call the unfollow API.
info Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.
- See Also:
-
unfollow
public final CompletableFuture<UnfollowResponse> unfollow(Function<UnfollowRequest.Builder, ObjectBuilder<UnfollowRequest>> fn) Unfollow an index.Convert a cross-cluster replication follower index to a regular index. The API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. The follower index must be paused and closed before you call the unfollow API.
info Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.
- Parameters:
fn
- a function that initializes a builder to create theUnfollowRequest
- See Also:
-