Package org.elasticsearch.client
Class CcrClient
- java.lang.Object
-
- org.elasticsearch.client.CcrClient
-
public final class CcrClient extends java.lang.ObjectA wrapper for theRestHighLevelClientthat 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 AcknowledgedResponsedeleteAutoFollowPattern(DeleteAutoFollowPatternRequest request, RequestOptions options)Deletes an auto follow pattern.voiddeleteAutoFollowPatternAsync(DeleteAutoFollowPatternRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously deletes an auto follow pattern.BroadcastResponseforgetFollower(ForgetFollowerRequest request, RequestOptions options)Instructs an index acting as a leader index to forget the specified follower index.voidforgetFollowerAsync(ForgetFollowerRequest request, RequestOptions options, ActionListener<BroadcastResponse> listener)Asynchronously instructs an index acting as a leader index to forget the specified follower index.GetAutoFollowPatternResponsegetAutoFollowPattern(GetAutoFollowPatternRequest request, RequestOptions options)Gets an auto follow pattern.voidgetAutoFollowPatternAsync(GetAutoFollowPatternRequest request, RequestOptions options, ActionListener<GetAutoFollowPatternResponse> listener)Asynchronously gets an auto follow pattern.CcrStatsResponsegetCcrStats(CcrStatsRequest request, RequestOptions options)Gets all CCR stats.voidgetCcrStatsAsync(CcrStatsRequest request, RequestOptions options, ActionListener<CcrStatsResponse> listener)Asynchronously gets all CCR stats.FollowInfoResponsegetFollowInfo(FollowInfoRequest request, RequestOptions options)Gets follow info for specific indices.voidgetFollowInfoAsync(FollowInfoRequest request, RequestOptions options, ActionListener<FollowInfoResponse> listener)Asynchronously gets follow info for specific indices.FollowStatsResponsegetFollowStats(FollowStatsRequest request, RequestOptions options)Gets follow stats for specific indices.voidgetFollowStatsAsync(FollowStatsRequest request, RequestOptions options, ActionListener<FollowStatsResponse> listener)Asynchronously gets follow stats for specific indices.AcknowledgedResponsepauseFollow(PauseFollowRequest request, RequestOptions options)Instructs a follower index to pause the following of a leader index.voidpauseFollowAsync(PauseFollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously instruct a follower index to pause the following of a leader index.AcknowledgedResponseputAutoFollowPattern(PutAutoFollowPatternRequest request, RequestOptions options)Stores an auto follow pattern.voidputAutoFollowPatternAsync(PutAutoFollowPatternRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously stores an auto follow pattern.PutFollowResponseputFollow(PutFollowRequest request, RequestOptions options)Executes the put follow api, which creates a follower index and then the follower index starts following the leader index.voidputFollowAsync(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.AcknowledgedResponseresumeFollow(ResumeFollowRequest request, RequestOptions options)Instructs a follower index to resume the following of a leader index.voidresumeFollowAsync(ResumeFollowRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously instruct a follower index to resume the following of a leader index.AcknowledgedResponseunfollow(UnfollowRequest request, RequestOptions options)Instructs a follower index to unfollow and become a regular index.voidunfollowAsync(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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif nothing needs to be customized
-
-