API: Drop deprecated methods from Retry (#33925)
We deprecated the `Retry.withBackoff` flavors with `Settings` in 6.5 because they were no longer needed. This drops them form 7.0.
This commit is contained in:
parent
e17bd8e913
commit
cac93949fe
|
@ -18,3 +18,7 @@ appropriate request directly.
|
|||
* All classes present in `org.elasticsearch.search.aggregations.metrics.*` packages
|
||||
were moved to a single `org.elasticsearch.search.aggregations.metrics` package.
|
||||
|
||||
==== `Retry.withBackoff` methods with `Settings` removed
|
||||
|
||||
The variants of `Retry.withBackoff` that included `Settings` have been removed
|
||||
because `Settings` is no longer needed.
|
|
@ -22,7 +22,6 @@ import org.apache.logging.log4j.Logger;
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.PlainActionFuture;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.FutureUtils;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
@ -61,21 +60,6 @@ public class Retry {
|
|||
r.execute(bulkRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception and delegates results to the
|
||||
* provided listener. Retries will be scheduled using the class's thread pool.
|
||||
* @param consumer The consumer to which apply the request and listener
|
||||
* @param bulkRequest The bulk request that should be executed.
|
||||
* @param listener A listener that is invoked when the bulk request finishes or completes with an exception. The listener is not
|
||||
* @param settings settings
|
||||
* @deprecated Prefer {@link #withBackoff(BiConsumer, BulkRequest, ActionListener)}. The {@link Settings} isn't used.
|
||||
*/
|
||||
@Deprecated
|
||||
public void withBackoff(BiConsumer<BulkRequest, ActionListener<BulkResponse>> consumer, BulkRequest bulkRequest,
|
||||
ActionListener<BulkResponse> listener, Settings settings) {
|
||||
withBackoff(consumer, bulkRequest, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception. Retries will be scheduled using
|
||||
* the class's thread pool.
|
||||
|
@ -91,22 +75,6 @@ public class Retry {
|
|||
return future;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception. Retries will be scheduled using
|
||||
* the class's thread pool.
|
||||
*
|
||||
* @param consumer The consumer to which apply the request and listener
|
||||
* @param bulkRequest The bulk request that should be executed.
|
||||
* @param settings settings
|
||||
* @return a future representing the bulk response returned by the client.
|
||||
* @deprecated prefer {@link #withBackoff(BiConsumer, BulkRequest)}. The {@link Settings} isn't used.
|
||||
*/
|
||||
@Deprecated
|
||||
public PlainActionFuture<BulkResponse> withBackoff(BiConsumer<BulkRequest, ActionListener<BulkResponse>> consumer,
|
||||
BulkRequest bulkRequest, Settings settings) {
|
||||
return withBackoff(consumer, bulkRequest);
|
||||
}
|
||||
|
||||
static class RetryHandler implements ActionListener<BulkResponse> {
|
||||
private static final RestStatus RETRY_STATUS = RestStatus.TOO_MANY_REQUESTS;
|
||||
private static final Logger logger = LogManager.getLogger(RetryHandler.class);
|
||||
|
|
Loading…
Reference in New Issue