You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by lj...@apache.org on 2020/05/11 07:24:56 UTC

[incubator-ratis] branch master updated: RATIS-934. Make ExceptionDependentRetry setters public.

This is an automated email from the ASF dual-hosted git repository.

ljain pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git


The following commit(s) were added to refs/heads/master by this push:
     new 463b763  RATIS-934. Make ExceptionDependentRetry setters public.
463b763 is described below

commit 463b76314b9899acbd1918b51d59f1eea485776c
Author: Lokesh Jain <lj...@apache.org>
AuthorDate: Mon May 11 12:54:22 2020 +0530

    RATIS-934. Make ExceptionDependentRetry setters public.
---
 .../main/java/org/apache/ratis/retry/ExceptionDependentRetry.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ratis-common/src/main/java/org/apache/ratis/retry/ExceptionDependentRetry.java b/ratis-common/src/main/java/org/apache/ratis/retry/ExceptionDependentRetry.java
index da25099..4ac81a9 100644
--- a/ratis-common/src/main/java/org/apache/ratis/retry/ExceptionDependentRetry.java
+++ b/ratis-common/src/main/java/org/apache/ratis/retry/ExceptionDependentRetry.java
@@ -38,7 +38,7 @@ public final class ExceptionDependentRetry implements RetryPolicy {
         new TreeMap<>();
     private int maxAttempts = Integer.MAX_VALUE;
 
-    Builder setExceptionToPolicy(Class<? extends Throwable> exception,
+    public Builder setExceptionToPolicy(Class<? extends Throwable> exception,
         RetryPolicy retryPolicy) {
       Preconditions.assertTrue(retryPolicy != null, "Exception to policy should not be null");
       final RetryPolicy previous = exceptionNameToPolicyMap.put(exception.getName(), retryPolicy);
@@ -46,13 +46,13 @@ public final class ExceptionDependentRetry implements RetryPolicy {
       return this;
     }
 
-    Builder setDefaultPolicy(RetryPolicy retryPolicy) {
+    public Builder setDefaultPolicy(RetryPolicy retryPolicy) {
       Preconditions.assertTrue(retryPolicy != null, "Default Policy should not be null");
       this.defaultPolicy = retryPolicy;
       return this;
     }
 
-    Builder setMaxAttempts(int attempts) {
+    public Builder setMaxAttempts(int attempts) {
       this.maxAttempts = attempts;
       return this;
     }