diff --git a/docs/reference/migration/migrate_7_0/java.asciidoc b/docs/reference/migration/migrate_7_0/java.asciidoc index ea263283291..dde61259a21 100644 --- a/docs/reference/migration/migrate_7_0/java.asciidoc +++ b/docs/reference/migration/migrate_7_0/java.asciidoc @@ -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. \ No newline at end of file diff --git a/server/src/main/java/org/elasticsearch/action/bulk/Retry.java b/server/src/main/java/org/elasticsearch/action/bulk/Retry.java index a7163a90845..6ec5017e832 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/Retry.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/Retry.java @@ -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> consumer, BulkRequest bulkRequest, - ActionListener 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 withBackoff(BiConsumer> consumer, - BulkRequest bulkRequest, Settings settings) { - return withBackoff(consumer, bulkRequest); - } - static class RetryHandler implements ActionListener { private static final RestStatus RETRY_STATUS = RestStatus.TOO_MANY_REQUESTS; private static final Logger logger = LogManager.getLogger(RetryHandler.class);