Package org.elasticsearch.client
Class CcrClient
- java.lang.Object
-
- org.elasticsearch.client.CcrClient
-
public final class CcrClient extends java.lang.Object
A wrapper for theRestHighLevelClient
that provides methods for accessing the Elastic ccr related methodsSee the X-Pack Rollup APIs on elastic.co for more information.
-
-
Method Summary
Modifier and Type Method Description AcknowledgedResponse
deleteAutoFollowPattern(DeleteAutoFollowPatternRequest request, RequestOptions options)
Deletes an auto follow pattern.void
deleteAutoFollowPatternAsync(DeleteAutoFollowPatternRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously deletes an auto follow pattern.BroadcastResponse
forgetFollower(ForgetFollowerRequest request, RequestOptions options)
Instructs an index acting as a leader index to forget the specified follower index.void
forgetFollowerAsync(ForgetFollowerRequest request, RequestOptions options, ActionListener<BroadcastResponse> listener)
Asynchronously instructs an index acting as a leader index to forget the specified follower index.GetAutoFollowPatternResponse
getAutoFollowPattern(GetAutoFollowPatternRequest request, RequestOptions options)
Gets an auto follow pattern.void
getAutoFollowPatternAsync(GetAutoFollowPatternRequest request, RequestOptions options, ActionListener<GetAutoFollowPatternResponse> listener)
Asynchronously gets an auto follow pattern.CcrStatsResponse
getCcrStats(CcrStatsRequest request, RequestOptions options)
Gets all CCR stats.void
getCcrStatsAsync(CcrStatsRequest request, RequestOptions options, ActionListener<CcrStatsResponse> listener)
Asynchronously gets all CCR stats.FollowInfoResponse
getFollowInfo(FollowInfoRequest request, RequestOptions options)
Gets follow info for specific indices.void
getFollowInfoAsync(FollowInfoRequest request, RequestOptions options, ActionListener<FollowInfoResponse> listener)
Asynchronously gets follow info for specific indices.FollowStatsResponse
getFollowStats(FollowStatsRequest request, RequestOptions options)
Gets follow stats for specific indices.void
getFollowStatsAsync(FollowStatsRequest request, RequestOptions options, ActionListener<FollowStatsResponse> listener)
Asynchronously gets follow stats for specific indices.AcknowledgedResponse
pauseFollow(PauseFollowRequest request, RequestOptions options)
Instructs a follower index to pause the following of a leader index.void
pauseFollowAsync(PauseFollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously instruct a follower index to pause the following of a leader index.AcknowledgedResponse
putAutoFollowPattern(PutAutoFollowPatternRequest request, RequestOptions options)
Stores an auto follow pattern.void
putAutoFollowPatternAsync(PutAutoFollowPatternRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously stores an auto follow pattern.PutFollowResponse
putFollow(PutFollowRequest request, RequestOptions options)
Executes the put follow api, which creates a follower index and then the follower index starts following the leader index.void
putFollowAsync(PutFollowRequest request, RequestOptions options, ActionListener<PutFollowResponse> listener)
Asynchronously executes the put follow api, which creates a follower index and then the follower index starts following the leader index.AcknowledgedResponse
resumeFollow(ResumeFollowRequest request, RequestOptions options)
Instructs a follower index to resume the following of a leader index.void
resumeFollowAsync(ResumeFollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously instruct a follower index to resume the following of a leader index.AcknowledgedResponse
unfollow(UnfollowRequest request, RequestOptions options)
Instructs a follower index to unfollow and become a regular index.void
unfollowAsync(UnfollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously instructs a follower index to unfollow and become a regular index.
-
-
-
Method Detail
-
putFollow
public PutFollowResponse putFollow(PutFollowRequest request, RequestOptions options) throws java.io.IOException
Executes the put follow api, which creates a follower index and then the follower index starts following the leader index. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putFollowAsync
public void putFollowAsync(PutFollowRequest request, RequestOptions options, ActionListener<PutFollowResponse> listener)
Asynchronously executes the put follow api, which creates a follower index and then the follower index starts following the leader index. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
pauseFollow
public AcknowledgedResponse pauseFollow(PauseFollowRequest request, RequestOptions options) throws java.io.IOException
Instructs a follower index to pause the following of a leader index. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
pauseFollowAsync
public void pauseFollowAsync(PauseFollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously instruct a follower index to pause the following of a leader index. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
resumeFollow
public AcknowledgedResponse resumeFollow(ResumeFollowRequest request, RequestOptions options) throws java.io.IOException
Instructs a follower index to resume the following of a leader index. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
resumeFollowAsync
public void resumeFollowAsync(ResumeFollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously instruct a follower index to resume the following of a leader index. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
unfollow
public AcknowledgedResponse unfollow(UnfollowRequest request, RequestOptions options) throws java.io.IOException
Instructs a follower index to unfollow and become a regular index. Note that index following needs to be paused and the follower index needs to be closed. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
unfollowAsync
public void unfollowAsync(UnfollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously instructs a follower index to unfollow and become a regular index. Note that index following needs to be paused and the follower index needs to be closed. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
forgetFollower
public BroadcastResponse forgetFollower(ForgetFollowerRequest request, RequestOptions options) throws java.io.IOException
Instructs an index acting as a leader index to forget the specified follower index. See the docs for more details on the intended usage of this API.- Parameters:
request
- the requestoptions
- the request options (e.g., headers), useRequestOptions.DEFAULT
if the defaults are acceptable.- Returns:
- the response
- Throws:
java.io.IOException
- if an I/O exception occurs while executing this request
-
forgetFollowerAsync
public void forgetFollowerAsync(ForgetFollowerRequest request, RequestOptions options, ActionListener<BroadcastResponse> listener)
Asynchronously instructs an index acting as a leader index to forget the specified follower index. See the docs for more details on the intended usage of this API.- Parameters:
request
- the requestoptions
- the request options (e.g., headers), useRequestOptions.DEFAULT
if the defaults are acceptable.
-
putAutoFollowPattern
public AcknowledgedResponse putAutoFollowPattern(PutAutoFollowPatternRequest request, RequestOptions options) throws java.io.IOException
Stores an auto follow pattern. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putAutoFollowPatternAsync
public void putAutoFollowPatternAsync(PutAutoFollowPatternRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously stores an auto follow pattern. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
deleteAutoFollowPattern
public AcknowledgedResponse deleteAutoFollowPattern(DeleteAutoFollowPatternRequest request, RequestOptions options) throws java.io.IOException
Deletes an auto follow pattern. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deleteAutoFollowPatternAsync
public void deleteAutoFollowPatternAsync(DeleteAutoFollowPatternRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously deletes an auto follow pattern. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getAutoFollowPattern
public GetAutoFollowPatternResponse getAutoFollowPattern(GetAutoFollowPatternRequest request, RequestOptions options) throws java.io.IOException
Gets an auto follow pattern. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getAutoFollowPatternAsync
public void getAutoFollowPatternAsync(GetAutoFollowPatternRequest request, RequestOptions options, ActionListener<GetAutoFollowPatternResponse> listener)
Asynchronously gets an auto follow pattern. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion
-
getCcrStats
public CcrStatsResponse getCcrStats(CcrStatsRequest request, RequestOptions options) throws java.io.IOException
Gets all CCR stats. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getCcrStatsAsync
public void getCcrStatsAsync(CcrStatsRequest request, RequestOptions options, ActionListener<CcrStatsResponse> listener)
Asynchronously gets all CCR stats. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized
-
getFollowStats
public FollowStatsResponse getFollowStats(FollowStatsRequest request, RequestOptions options) throws java.io.IOException
Gets follow stats for specific indices. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getFollowStatsAsync
public void getFollowStatsAsync(FollowStatsRequest request, RequestOptions options, ActionListener<FollowStatsResponse> listener)
Asynchronously gets follow stats for specific indices. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized
-
getFollowInfo
public FollowInfoResponse getFollowInfo(FollowInfoRequest request, RequestOptions options) throws java.io.IOException
Gets follow info for specific indices. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getFollowInfoAsync
public void getFollowInfoAsync(FollowInfoRequest request, RequestOptions options, ActionListener<FollowInfoResponse> listener)
Asynchronously gets follow info for specific indices. See the docs for more.- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized
-
-