Allow incremental recovery
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / ConfigParams.java
index fb571f11f84179fcfe49ff78434b76daf012e945..c5c78130e8fcb22c5c614a03032a74acae40a2bc 100644 (file)
@@ -40,6 +40,15 @@ public interface ConfigParams {
      */
     int getSnapshotDataThresholdPercentage();
 
+
+    /**
+     * Returns the interval(in seconds) after which a snapshot should be taken during recovery.
+     * Negative value means don't take snapshots.
+     *
+     * @return the interval of recovery snapshot in seconds
+     */
+    int getRecoverySnapshotIntervalSeconds();
+
     /**
      * Returns the interval at which a heart beat message should be sent to remote followers.
      *
@@ -54,6 +63,14 @@ public interface ConfigParams {
      */
     FiniteDuration getElectionTimeOutInterval();
 
+    /**
+     * Returns the number by which a candidate should divide the election timeout it has calculated. This serves
+     * to speed up retries when elections result in a stalemate.
+     *
+     * @return the interval as a FiniteDuration.
+     */
+    long getCandidateElectionTimeoutDivisor();
+
     /**
      * Returns the maximum election time variance. The election is scheduled using both the election timeout
      * and variance.