2222import org .apache .logging .log4j .LogManager ;
2323import org .elasticsearch .action .ActionListener ;
2424import org .elasticsearch .action .support .PlainActionFuture ;
25- import org .elasticsearch .common .settings .Settings ;
2625import org .elasticsearch .common .unit .TimeValue ;
2726import org .elasticsearch .common .util .concurrent .FutureUtils ;
2827import org .elasticsearch .rest .RestStatus ;
@@ -61,21 +60,6 @@ public void withBackoff(BiConsumer<BulkRequest, ActionListener<BulkResponse>> co
6160 r .execute (bulkRequest );
6261 }
6362
64- /**
65- * Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception and delegates results to the
66- * provided listener. Retries will be scheduled using the class's thread pool.
67- * @param consumer The consumer to which apply the request and listener
68- * @param bulkRequest The bulk request that should be executed.
69- * @param listener A listener that is invoked when the bulk request finishes or completes with an exception. The listener is not
70- * @param settings settings
71- * @deprecated Prefer {@link #withBackoff(BiConsumer, BulkRequest, ActionListener)}. The {@link Settings} isn't used.
72- */
73- @ Deprecated
74- public void withBackoff (BiConsumer <BulkRequest , ActionListener <BulkResponse >> consumer , BulkRequest bulkRequest ,
75- ActionListener <BulkResponse > listener , Settings settings ) {
76- withBackoff (consumer , bulkRequest , listener );
77- }
78-
7963 /**
8064 * Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception. Retries will be scheduled using
8165 * the class's thread pool.
@@ -91,22 +75,6 @@ public PlainActionFuture<BulkResponse> withBackoff(BiConsumer<BulkRequest, Actio
9175 return future ;
9276 }
9377
94- /**
95- * Invokes #accept(BulkRequest, ActionListener). Backs off on the provided exception. Retries will be scheduled using
96- * the class's thread pool.
97- *
98- * @param consumer The consumer to which apply the request and listener
99- * @param bulkRequest The bulk request that should be executed.
100- * @param settings settings
101- * @return a future representing the bulk response returned by the client.
102- * @deprecated prefer {@link #withBackoff(BiConsumer, BulkRequest)}. The {@link Settings} isn't used.
103- */
104- @ Deprecated
105- public PlainActionFuture <BulkResponse > withBackoff (BiConsumer <BulkRequest , ActionListener <BulkResponse >> consumer ,
106- BulkRequest bulkRequest , Settings settings ) {
107- return withBackoff (consumer , bulkRequest );
108- }
109-
11078 static class RetryHandler implements ActionListener <BulkResponse > {
11179 private static final RestStatus RETRY_STATUS = RestStatus .TOO_MANY_REQUESTS ;
11280 private static final Logger logger = LogManager .getLogger (RetryHandler .class );
0 commit comments