Bug 2187: Bootstrap EOS shard when no local shards configured
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / ConfigParams.java
index 4c6434aec457db0b4899973f36effd0b37e7d14a..c63deae7171904638c3315798b2d5332ae85a442 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.controller.cluster.raft;
 
+import javax.annotation.Nonnull;
+import org.opendaylight.controller.cluster.raft.policy.RaftPolicy;
 import scala.concurrent.duration.FiniteDuration;
 
 /**
@@ -26,7 +28,15 @@ public interface ConfigParams {
      *
      * @return long
      */
-    public long getSnapshotBatchCount();
+    long getSnapshotBatchCount();
+
+    /**
+     * The percentage of total memory in the in-memory Raft log before a snapshot
+     * is to be taken
+     *
+     * @return int
+     */
+    int getSnapshotDataThresholdPercentage();
 
     /**
      * The interval at which a heart beat message will be sent to the remote
@@ -34,7 +44,7 @@ public interface ConfigParams {
      *
      * @return FiniteDuration
      */
-    public FiniteDuration getHeartBeatInterval();
+    FiniteDuration getHeartBeatInterval();
 
     /**
      * The interval in which a new election would get triggered if no leader is found
@@ -43,7 +53,7 @@ public interface ConfigParams {
      *
      * @return FiniteDuration
      */
-    public FiniteDuration getElectionTimeOutInterval();
+    FiniteDuration getElectionTimeOutInterval();
 
     /**
      * The maximum election time variance. The election is scheduled using both
@@ -51,5 +61,47 @@ public interface ConfigParams {
      *
      * @return int
      */
-    public int getElectionTimeVariance();
+    int getElectionTimeVariance();
+
+    /**
+     * The size (in bytes) of the snapshot chunk sent from Leader
+     */
+    int getSnapshotChunkSize();
+
+    /**
+     * The number of journal log entries to batch on recovery before applying.
+     */
+    int getJournalRecoveryLogBatchSize();
+
+    /**
+     * The interval in which the leader needs to check itself if its isolated
+     * @return FiniteDuration
+     */
+    long getIsolatedCheckIntervalInMillis();
+
+
+    /**
+     * The multiplication factor to be used to determine shard election timeout. The election timeout
+     * is determined by multiplying the election timeout factor with the heartbeat duration.
+     */
+    long getElectionTimeoutFactor();
+
+
+    /**
+     *
+     * @return An instance of org.opendaylight.controller.cluster.raft.policy.RaftPolicy or an instance of the
+     * DefaultRaftPolicy
+     */
+    RaftPolicy getRaftPolicy();
+
+    /**
+     * Returns the PeerAddressResolver.
+     */
+    @Nonnull PeerAddressResolver getPeerAddressResolver();
+
+    /**
+     * @return the RaftPolicy class used by this configuration
+     */
+    String getCustomRaftPolicyImplementationClass();
+
 }