X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FConfigParams.java;h=86ce3113fab53e9f66d64db0fa4d793fd08fc010;hb=6751227ff9443018d75e3a99da5693230d23d82b;hp=652771b4f1c6c6250600e0463ee8242520692757;hpb=b0f8283587b5cc8573d29f66219cbe7f70e21e1b;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ConfigParams.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ConfigParams.java index 652771b4f1..86ce3113fa 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ConfigParams.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ConfigParams.java @@ -13,15 +13,19 @@ import scala.concurrent.duration.FiniteDuration; /** * Configuration Parameter interface for configuring the Raft consensus system - *

+ * + *

* Any component using this implementation might want to provide an implementation of * this interface to configure - *

+ * + *

* A default implementation will be used if none is provided. * * @author Kamal Rameshan */ public interface ConfigParams { + int MEGABYTE = 1048576; + /** * Returns the minimum number of entries to be present in the in-memory Raft log for a snapshot to be taken. * @@ -112,4 +116,19 @@ public interface ConfigParams { */ String getCustomRaftPolicyImplementationClass(); + /** + * Returns the directory in which to create temp files. + * + * @return the directory in which to create temp files. + */ + @Nonnull + String getTempFileDirectory(); + + /** + * Returns the threshold in terms of number of bytes when streaming data before it should switch from storing in + * memory to buffering to a file. + * + * @return the threshold in terms of number of bytes. + */ + int getFileBackedStreamingThreshold(); }