X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FDefaultConfigParamsImpl.java;h=56fb63367207b94ad368214a569e2009f8c5648f;hb=200164de7246237ee45f761c4db15b8b51f6a93c;hp=2d2f95bd767a566edfd0db331b3ece1d08c64d43;hpb=b0f8283587b5cc8573d29f66219cbe7f70e21e1b;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/DefaultConfigParamsImpl.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/DefaultConfigParamsImpl.java index 2d2f95bd76..56fb633672 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/DefaultConfigParamsImpl.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/DefaultConfigParamsImpl.java @@ -41,7 +41,8 @@ public class DefaultConfigParamsImpl implements ConfigParams { /** * The interval at which a heart beat message will be sent to the remote * RaftActor. - *
+ * + *
* 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