X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FConfigParams.java;h=8351374d60fe0e73bb5ca2fbfa2ea01cbd5a3f52;hp=c5c78130e8fcb22c5c614a03032a74acae40a2bc;hb=7cb260aeb0738104e3bee8a086de9e2e5f77b7e0;hpb=66e956cbf397a86f1a512396feb7cb87ea602f92 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 c5c78130e8..8351374d60 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 @@ -12,14 +12,9 @@ import org.opendaylight.controller.cluster.raft.policy.RaftPolicy; 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. + * 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 */ @@ -35,15 +30,23 @@ public interface ConfigParams { /** * Returns the percentage of total memory used in the in-memory Raft log before a snapshot should be taken. + * Disabled when direct threshold is enabled. * * @return the percentage. */ int getSnapshotDataThresholdPercentage(); + /** + * Returns the max size of memory used in the in-memory Raft log before a snapshot should be taken. 0 means that + * direct threshold is disabled and percentage is used instead. + * + * @return maximum journal size (in MiB). + */ + int getSnapshotDataThreshold(); /** - * Returns the interval(in seconds) after which a snapshot should be taken during recovery. - * Negative value means don't take snapshots. + * Returns the interval(in seconds) after which a snapshot should be taken during recovery. Negative value means + * do not take snapshots. * * @return the interval of recovery snapshot in seconds */ @@ -100,7 +103,6 @@ public interface ConfigParams { */ long getIsolatedCheckIntervalInMillis(); - /** * Returns the multiplication factor to be used to determine the shard election timeout. The election timeout * is determined by multiplying the election timeout factor with the heart beat duration. @@ -109,7 +111,6 @@ public interface ConfigParams { */ long getElectionTimeoutFactor(); - /** * Returns the RaftPolicy used to determine certain Raft behaviors. *