|
29 | 29 | import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusRequest;
|
30 | 30 | import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusResponse;
|
31 | 31 | import org.elasticsearch.client.indexlifecycle.PutLifecyclePolicyRequest;
|
| 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.StartILMRequest;
|
@@ -271,4 +272,32 @@ public void explainLifecycleAsync(ExplainLifecycleRequest request, RequestOption
|
271 | 272 | restHighLevelClient.performRequestAsyncAndParseEntity(request, RequestConverters::explainLifecycle, options,
|
272 | 273 | ExplainLifecycleResponse::fromXContent, listener, emptySet());
|
273 | 274 | }
|
| 275 | + |
| 276 | + /** |
| 277 | + * Retry lifecycle step for given indices |
| 278 | + * See <a href="https://fix-me-when-we-have-docs.com"> |
| 279 | + * the docs</a> for more. |
| 280 | + * @param request the request |
| 281 | + * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized |
| 282 | + * @return the response |
| 283 | + * @throws IOException in case there is a problem sending the request or parsing back the response |
| 284 | + */ |
| 285 | + public AcknowledgedResponse retryLifecycleStep(RetryLifecyclePolicyRequest request, RequestOptions options) throws IOException { |
| 286 | + return restHighLevelClient.performRequestAndParseEntity(request, RequestConverters::retryLifecycle, options, |
| 287 | + AcknowledgedResponse::fromXContent, emptySet()); |
| 288 | + } |
| 289 | + |
| 290 | + /** |
| 291 | + * Asynchronously retry the lifecycle step for given indices |
| 292 | + * See <a href="https://fix-me-when-we-have-docs.com"> |
| 293 | + * the docs</a> for more. |
| 294 | + * @param request the request |
| 295 | + * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized |
| 296 | + * @param listener the listener to be notified upon request completion |
| 297 | + */ |
| 298 | + public void retryLifecycleStepAsync(RetryLifecyclePolicyRequest request, RequestOptions options, |
| 299 | + ActionListener<AcknowledgedResponse> listener) { |
| 300 | + restHighLevelClient.performRequestAsyncAndParseEntity(request, RequestConverters::retryLifecycle, options, |
| 301 | + AcknowledgedResponse::fromXContent, listener, emptySet()); |
| 302 | + } |
274 | 303 | }
|
0 commit comments