You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/06/13 13:22:14 UTC

[GitHub] [ratis] codings-dan commented on a diff in pull request #652: RATIS-1588. Add a builder of RaftStorageImpl

codings-dan commented on code in PR #652:
URL: https://github.com/apache/ratis/pull/652#discussion_r895709944


##########
ratis-server/src/main/java/org/apache/ratis/server/storage/RaftStorageImpl.java:
##########
@@ -41,6 +41,41 @@ public enum StartupOption {
     FORMAT
   }
 
+  public static Builder newBuilder() {
+    return new RaftStorageImpl.Builder();
+  }
+
+  public static class Builder {
+    private File dir;
+    private CorruptionPolicy logCorruptionPolicy;
+    private StartupOption option;
+    private long storageFeeSpaceMin;
+
+    public Builder setDir(File dir) {
+      this.dir = dir;
+      return this;
+    }
+
+    public Builder setLogCorruptionPolicy(CorruptionPolicy logCorruptionPolicy) {
+      this.logCorruptionPolicy = logCorruptionPolicy;
+      return this;
+    }
+
+    public Builder setOption(StartupOption option) {
+      this.option = option;
+      return this;
+    }
+
+    public Builder setStorageFeeSpaceMin(long storageFeeSpaceMin) {

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org