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=c63deae7171904638c3315798b2d5332ae85a442;hb=15f11d24306fe2796411e8078a84fc82213bacf6;hp=bff2a2779733761bff220e7e1223e85c46d18a73;hpb=b3e553ce5b3d3e972cbe19465ab7af2fcb39934c;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 bff2a27797..c63deae717 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 @@ -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; /** @@ -28,6 +30,14 @@ public interface ConfigParams { */ 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 * RaftActor @@ -62,4 +72,36 @@ public interface ConfigParams { * 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(); + }