aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/remote/RemoteRetrier.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/remote/RemoteRetrier.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/remote/RemoteRetrier.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteRetrier.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteRetrier.java
index 8359f4de99..27de8b7305 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteRetrier.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteRetrier.java
@@ -36,13 +36,13 @@ import java.util.function.Supplier;
* // Not retried.
* throw PassThroughException(new IOException("fail"));
* }
- * } catch (RetryException2 e) {
+ * } catch (RetryException e) {
* // e.getCause() is the IOException
* System.out.println(e.getCause());
* }
* </code>
*/
-class RemoteRetrier extends Retrier2 {
+class RemoteRetrier extends Retrier {
/**
* Wraps around an {@link Exception} to make it pass through a single layer of retries.
@@ -96,13 +96,13 @@ class RemoteRetrier extends Retrier2 {
}
@Override
- public <T> T execute(Callable<T> call) throws RetryException2, InterruptedException {
+ public <T> T execute(Callable<T> call) throws RetryException, InterruptedException {
try {
return super.execute(call);
- } catch (RetryException2 e) {
+ } catch (RetryException e) {
if (e.getCause() instanceof PassThroughException) {
PassThroughException passThrough = (PassThroughException) e.getCause();
- throw new RetryException2("Retries aborted because of PassThroughException",
+ throw new RetryException("Retries aborted because of PassThroughException",
e.getAttempts(), (Exception) passThrough.getCause());
}
throw e;
@@ -116,7 +116,7 @@ class RemoteRetrier extends Retrier2 {
return e -> !(e instanceof PassThroughException) && delegate.test(e);
}
- static class ExponentialBackoff implements Retrier2.Backoff {
+ static class ExponentialBackoff implements Retrier.Backoff {
private final long maxMillis;
private long nextDelayMillis;