Bug 5740: Remove Serializable where not necessary
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / DefaultConfigParamsImpl.java
index 2d2f95bd767a566edfd0db331b3ece1d08c64d43..56fb63367207b94ad368214a569e2009f8c5648f 100644 (file)
@@ -41,7 +41,8 @@ public class DefaultConfigParamsImpl implements ConfigParams {
     /**
      * The interval at which a heart beat message will be sent to the remote
      * RaftActor.
-     * <p/>
+     *
+     * <p>
      * Since this is set to 100 milliseconds the Election timeout should be
      * at least 200 milliseconds
      */
@@ -67,6 +68,10 @@ public class DefaultConfigParamsImpl implements ConfigParams {
 
     private PeerAddressResolver peerAddressResolver = NoopPeerAddressResolver.INSTANCE;
 
+    private String tempFileDirectory = "";
+
+    private int fileBackedStreamingThreshold = 128 * MEGABYTE;
+
     public void setHeartBeatInterval(FiniteDuration heartBeatInterval) {
         this.heartBeatInterval = heartBeatInterval;
         electionTimeOutInterval = null;
@@ -97,6 +102,14 @@ public class DefaultConfigParamsImpl implements ConfigParams {
         electionTimeOutInterval = null;
     }
 
+    public void setTempFileDirectory(String tempFileDirectory) {
+        this.tempFileDirectory = tempFileDirectory;
+    }
+
+    public void setFileBackedStreamingThreshold(int fileBackedStreamingThreshold) {
+        this.fileBackedStreamingThreshold = fileBackedStreamingThreshold;
+    }
+
     public void setCustomRaftPolicyImplementationClass(String customRaftPolicyImplementationClass) {
         this.customRaftPolicyImplementationClass = customRaftPolicyImplementationClass;
     }
@@ -161,6 +174,16 @@ public class DefaultConfigParamsImpl implements ConfigParams {
         return policySupplier.get();
     }
 
+    @Override
+    public String getTempFileDirectory() {
+        return tempFileDirectory;
+    }
+
+    @Override
+    public int getFileBackedStreamingThreshold() {
+        return fileBackedStreamingThreshold;
+    }
+
     private class PolicySupplier implements Supplier<RaftPolicy> {
         @Override
         @SuppressWarnings("checkstyle:IllegalCatch")