You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by ms...@apache.org on 2018/08/27 09:32:46 UTC

incubator-ratis git commit: RATIS-264. Add setter method to set the capacity of retry cache. Contributed by Nanda Kumar.

Repository: incubator-ratis
Updated Branches:
  refs/heads/master e6fd4949e -> c6c9ddf4d


RATIS-264. Add setter method to set the capacity of retry cache. Contributed by Nanda Kumar.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ratis/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ratis/commit/c6c9ddf4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ratis/tree/c6c9ddf4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ratis/diff/c6c9ddf4

Branch: refs/heads/master
Commit: c6c9ddf4d6f692d73b1693dc0746e21f70941876
Parents: e6fd494
Author: Mukul Kumar Singh <ms...@apache.org>
Authored: Mon Aug 27 15:02:00 2018 +0530
Committer: Mukul Kumar Singh <ms...@apache.org>
Committed: Mon Aug 27 15:02:00 2018 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/ratis/server/RaftServerConfigKeys.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/c6c9ddf4/ratis-server/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
----------------------------------------------------------------------
diff --git a/ratis-server/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java b/ratis-server/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
index 4d5abf5..314c506 100644
--- a/ratis-server/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
+++ b/ratis-server/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
@@ -261,6 +261,10 @@ public interface RaftServerConfigKeys {
           ConfUtils.requireMin(0));
     }
 
+    static void setCapacity(RaftProperties properties, int capacity) {
+      setInt(properties::setInt, CAPACITY_KEY, capacity);
+    }
+
     String EXPIRY_TIME_KEY = PREFIX + ".expirytime";
     TimeDuration EXPIRY_TIME_DEFAULT = TimeDuration.valueOf(60, TimeUnit.SECONDS);
     static TimeDuration expiryTime(RaftProperties properties) {