|
29 | 29 | import org.elasticsearch.client.indexlifecycle.PutLifecyclePolicyRequest;
|
30 | 30 | import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest;
|
31 | 31 | import org.elasticsearch.client.indexlifecycle.ExplainLifecycleResponse;
|
| 32 | +import org.elasticsearch.client.indexlifecycle.RetryLifecyclePolicyRequest; |
32 | 33 | import org.elasticsearch.client.indexlifecycle.RemoveIndexLifecyclePolicyRequest;
|
33 | 34 | import org.elasticsearch.client.indexlifecycle.RemoveIndexLifecyclePolicyResponse;
|
34 | 35 | import org.elasticsearch.client.indexlifecycle.SetIndexLifecyclePolicyRequest;
|
@@ -302,4 +303,32 @@ public void explainLifecycleAsync(ExplainLifecycleRequest request, RequestOption
|
302 | 303 | restHighLevelClient.performRequestAsyncAndParseEntity(request, RequestConverters::explainLifecycle, options,
|
303 | 304 | ExplainLifecycleResponse::fromXContent, listener, emptySet());
|
304 | 305 | }
|
| 306 | + |
| 307 | + /** |
| 308 | + * Retry lifecycle step for given indices |
| 309 | + * See <a href="https://fix-me-when-we-have-docs.com"> |
| 310 | + * the docs</a> for more. |
| 311 | + * @param request the request |
| 312 | + * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized |
| 313 | + * @return the response |
| 314 | + * @throws IOException in case there is a problem sending the request or parsing back the response |
| 315 | + */ |
| 316 | + public AcknowledgedResponse retryLifecycleStep(RetryLifecyclePolicyRequest request, RequestOptions options) throws IOException { |
| 317 | + return restHighLevelClient.performRequestAndParseEntity(request, RequestConverters::retryLifecycle, options, |
| 318 | + AcknowledgedResponse::fromXContent, emptySet()); |
| 319 | + } |
| 320 | + |
| 321 | + /** |
| 322 | + * Asynchronously retry the lifecycle step for given indices |
| 323 | + * See <a href="https://fix-me-when-we-have-docs.com"> |
| 324 | + * the docs</a> for more. |
| 325 | + * @param request the request |
| 326 | + * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized |
| 327 | + * @param listener the listener to be notified upon request completion |
| 328 | + */ |
| 329 | + public void retryLifecycleStepAsync(RetryLifecyclePolicyRequest request, RequestOptions options, |
| 330 | + ActionListener<AcknowledgedResponse> listener) { |
| 331 | + restHighLevelClient.performRequestAsyncAndParseEntity(request, RequestConverters::retryLifecycle, options, |
| 332 | + AcknowledgedResponse::fromXContent, listener, emptySet()); |
| 333 | + } |
305 | 334 | }
|
0 commit comments