Skip to content

Commit

Permalink
Remove unused wrapWithTimeout override (elastic#99360)
Browse files Browse the repository at this point in the history
This was deprecated in elastic#99334 and is now unused so can be removed.
  • Loading branch information
DaveCTurner authored Sep 8, 2023
1 parent f691eda commit 1c12f68
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,6 @@ public static <Response> ActionListener<Response> wrapWithTimeout(
return wrappedListener;
}

/**
* @deprecated Use {@link #wrapWithTimeout(ThreadPool, TimeValue, Executor, ActionListener, Consumer)} instead.
*/
@Deprecated(forRemoval = true)
public static <Response> ActionListener<Response> wrapWithTimeout(
ThreadPool threadPool,
TimeValue timeout,
String executor,
ActionListener<Response> listener,
Consumer<ActionListener<Response>> onTimeout
) {
TimeoutableListener<Response> wrappedListener = new TimeoutableListener<>(listener, onTimeout);
wrappedListener.cancellable = threadPool.schedule(wrappedListener, timeout, executor);
return wrappedListener;
}

private static class TimeoutableListener<Response> implements ActionListener<Response>, Runnable {

private final AtomicBoolean isDone = new AtomicBoolean(false);
Expand Down

0 comments on commit 1c12f68

Please sign in to comment.