@@ -85,15 +85,15 @@ public PutFollowResponse putFollow(PutFollowRequest request, RequestOptions opti
8585 *
8686 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html">
8787 * the docs</a> for more.
88- *
8988 * @param request the request
9089 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
9190 * @param listener the listener to be notified upon request completion
91+ * @return cancellable that may be used to cancel the request
9292 */
93- public void putFollowAsync (PutFollowRequest request ,
94- RequestOptions options ,
95- ActionListener <PutFollowResponse > listener ) {
96- restHighLevelClient .performRequestAsyncAndParseEntity (
93+ public Cancellable putFollowAsync (PutFollowRequest request ,
94+ RequestOptions options ,
95+ ActionListener <PutFollowResponse > listener ) {
96+ return restHighLevelClient .performRequestAsyncAndParseEntity (
9797 request ,
9898 CcrRequestConverters ::putFollow ,
9999 options ,
@@ -129,15 +129,15 @@ public AcknowledgedResponse pauseFollow(PauseFollowRequest request, RequestOptio
129129 *
130130 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-follow.html">
131131 * the docs</a> for more.
132- *
133132 * @param request the request
134133 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
135134 * @param listener the listener to be notified upon request completion
135+ * @return cancellable that may be used to cancel the request
136136 */
137- public void pauseFollowAsync (PauseFollowRequest request ,
138- RequestOptions options ,
139- ActionListener <AcknowledgedResponse > listener ) {
140- restHighLevelClient .performRequestAsyncAndParseEntity (
137+ public Cancellable pauseFollowAsync (PauseFollowRequest request ,
138+ RequestOptions options ,
139+ ActionListener <AcknowledgedResponse > listener ) {
140+ return restHighLevelClient .performRequestAsyncAndParseEntity (
141141 request ,
142142 CcrRequestConverters ::pauseFollow ,
143143 options ,
@@ -172,15 +172,15 @@ public AcknowledgedResponse resumeFollow(ResumeFollowRequest request, RequestOpt
172172 *
173173 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-follow.html">
174174 * the docs</a> for more.
175- *
176175 * @param request the request
177176 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
178177 * @param listener the listener to be notified upon request completion
178+ * @return cancellable that may be used to cancel the request
179179 */
180- public void resumeFollowAsync (ResumeFollowRequest request ,
181- RequestOptions options ,
182- ActionListener <AcknowledgedResponse > listener ) {
183- restHighLevelClient .performRequestAsyncAndParseEntity (
180+ public Cancellable resumeFollowAsync (ResumeFollowRequest request ,
181+ RequestOptions options ,
182+ ActionListener <AcknowledgedResponse > listener ) {
183+ return restHighLevelClient .performRequestAsyncAndParseEntity (
184184 request ,
185185 CcrRequestConverters ::resumeFollow ,
186186 options ,
@@ -217,15 +217,15 @@ public AcknowledgedResponse unfollow(UnfollowRequest request, RequestOptions opt
217217 *
218218 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-unfollow.html">
219219 * the docs</a> for more.
220- *
221220 * @param request the request
222221 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
223222 * @param listener the listener to be notified upon request completion
223+ * @return cancellable that may be used to cancel the request
224224 */
225- public void unfollowAsync (UnfollowRequest request ,
226- RequestOptions options ,
227- ActionListener <AcknowledgedResponse > listener ) {
228- restHighLevelClient .performRequestAsyncAndParseEntity (
225+ public Cancellable unfollowAsync (UnfollowRequest request ,
226+ RequestOptions options ,
227+ ActionListener <AcknowledgedResponse > listener ) {
228+ return restHighLevelClient .performRequestAsyncAndParseEntity (
229229 request ,
230230 CcrRequestConverters ::unfollow ,
231231 options ,
@@ -260,15 +260,15 @@ public BroadcastResponse forgetFollower(final ForgetFollowerRequest request, fin
260260 *
261261 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-forget-follower.html">the docs</a> for more details
262262 * on the intended usage of this API.
263- *
264263 * @param request the request
265264 * @param options the request options (e.g., headers), use {@link RequestOptions#DEFAULT} if the defaults are acceptable.
265+ * @return cancellable that may be used to cancel the request
266266 */
267- public void forgetFollowerAsync (
267+ public Cancellable forgetFollowerAsync (
268268 final ForgetFollowerRequest request ,
269269 final RequestOptions options ,
270270 final ActionListener <BroadcastResponse > listener ) {
271- restHighLevelClient .performRequestAsyncAndParseEntity (
271+ return restHighLevelClient .performRequestAsyncAndParseEntity (
272272 request ,
273273 CcrRequestConverters ::forgetFollower ,
274274 options ,
@@ -303,15 +303,15 @@ public AcknowledgedResponse putAutoFollowPattern(PutAutoFollowPatternRequest req
303303 *
304304 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html">
305305 * the docs</a> for more.
306- *
307306 * @param request the request
308307 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
309308 * @param listener the listener to be notified upon request completion
309+ * @return cancellable that may be used to cancel the request
310310 */
311- public void putAutoFollowPatternAsync (PutAutoFollowPatternRequest request ,
312- RequestOptions options ,
313- ActionListener <AcknowledgedResponse > listener ) {
314- restHighLevelClient .performRequestAsyncAndParseEntity (
311+ public Cancellable putAutoFollowPatternAsync (PutAutoFollowPatternRequest request ,
312+ RequestOptions options ,
313+ ActionListener <AcknowledgedResponse > listener ) {
314+ return restHighLevelClient .performRequestAsyncAndParseEntity (
315315 request ,
316316 CcrRequestConverters ::putAutoFollowPattern ,
317317 options ,
@@ -347,15 +347,15 @@ public AcknowledgedResponse deleteAutoFollowPattern(DeleteAutoFollowPatternReque
347347 *
348348 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html">
349349 * the docs</a> for more.
350- *
351350 * @param request the request
352351 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
353352 * @param listener the listener to be notified upon request completion
353+ * @return cancellable that may be used to cancel the request
354354 */
355- public void deleteAutoFollowPatternAsync (DeleteAutoFollowPatternRequest request ,
356- RequestOptions options ,
357- ActionListener <AcknowledgedResponse > listener ) {
358- restHighLevelClient .performRequestAsyncAndParseEntity (
355+ public Cancellable deleteAutoFollowPatternAsync (DeleteAutoFollowPatternRequest request ,
356+ RequestOptions options ,
357+ ActionListener <AcknowledgedResponse > listener ) {
358+ return restHighLevelClient .performRequestAsyncAndParseEntity (
359359 request ,
360360 CcrRequestConverters ::deleteAutoFollowPattern ,
361361 options ,
@@ -392,15 +392,15 @@ public GetAutoFollowPatternResponse getAutoFollowPattern(GetAutoFollowPatternReq
392392 *
393393 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html">
394394 * the docs</a> for more.
395- *
396395 * @param request the request
397396 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
398397 * @param listener the listener to be notified upon request completion
398+ * @return cancellable that may be used to cancel the request
399399 */
400- public void getAutoFollowPatternAsync (GetAutoFollowPatternRequest request ,
401- RequestOptions options ,
402- ActionListener <GetAutoFollowPatternResponse > listener ) {
403- restHighLevelClient .performRequestAsyncAndParseEntity (
400+ public Cancellable getAutoFollowPatternAsync (GetAutoFollowPatternRequest request ,
401+ RequestOptions options ,
402+ ActionListener <GetAutoFollowPatternResponse > listener ) {
403+ return restHighLevelClient .performRequestAsyncAndParseEntity (
404404 request ,
405405 CcrRequestConverters ::getAutoFollowPattern ,
406406 options ,
@@ -437,14 +437,14 @@ public CcrStatsResponse getCcrStats(CcrStatsRequest request,
437437 *
438438 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html">
439439 * the docs</a> for more.
440- *
441440 * @param request the request
442441 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
442+ * @return cancellable that may be used to cancel the request
443443 */
444- public void getCcrStatsAsync (CcrStatsRequest request ,
445- RequestOptions options ,
446- ActionListener <CcrStatsResponse > listener ) {
447- restHighLevelClient .performRequestAsyncAndParseEntity (
444+ public Cancellable getCcrStatsAsync (CcrStatsRequest request ,
445+ RequestOptions options ,
446+ ActionListener <CcrStatsResponse > listener ) {
447+ return restHighLevelClient .performRequestAsyncAndParseEntity (
448448 request ,
449449 CcrRequestConverters ::getCcrStats ,
450450 options ,
@@ -481,14 +481,14 @@ public FollowStatsResponse getFollowStats(FollowStatsRequest request,
481481 *
482482 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html">
483483 * the docs</a> for more.
484- *
485484 * @param request the request
486485 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
486+ * @return cancellable that may be used to cancel the request
487487 */
488- public void getFollowStatsAsync (FollowStatsRequest request ,
489- RequestOptions options ,
490- ActionListener <FollowStatsResponse > listener ) {
491- restHighLevelClient .performRequestAsyncAndParseEntity (
488+ public Cancellable getFollowStatsAsync (FollowStatsRequest request ,
489+ RequestOptions options ,
490+ ActionListener <FollowStatsResponse > listener ) {
491+ return restHighLevelClient .performRequestAsyncAndParseEntity (
492492 request ,
493493 CcrRequestConverters ::getFollowStats ,
494494 options ,
@@ -524,14 +524,14 @@ public FollowInfoResponse getFollowInfo(FollowInfoRequest request, RequestOption
524524 *
525525 * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html">
526526 * the docs</a> for more.
527- *
528527 * @param request the request
529528 * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
529+ * @return cancellable that may be used to cancel the request
530530 */
531- public void getFollowInfoAsync (FollowInfoRequest request ,
532- RequestOptions options ,
533- ActionListener <FollowInfoResponse > listener ) {
534- restHighLevelClient .performRequestAsyncAndParseEntity (
531+ public Cancellable getFollowInfoAsync (FollowInfoRequest request ,
532+ RequestOptions options ,
533+ ActionListener <FollowInfoResponse > listener ) {
534+ return restHighLevelClient .performRequestAsyncAndParseEntity (
535535 request ,
536536 CcrRequestConverters ::getFollowInfo ,
537537 options ,
0 commit comments