Class TwoNodeClusterRaftPolicy
- java.lang.Object
-
- org.opendaylight.controller.cluster.datastore.policy.TwoNodeClusterRaftPolicy
-
- All Implemented Interfaces:
org.opendaylight.controller.cluster.raft.policy.RaftPolicy
public class TwoNodeClusterRaftPolicy extends Object implements org.opendaylight.controller.cluster.raft.policy.RaftPolicy
The TwoNodeClusterRaftPolicy is intended to be used in a two node deployment where when one instance of the controller goes down the other instance is to take over and move the state forward. When a TwoNodeClusterRaftPolicy is used Raft elections are disabled. This is primarily because we would need to specify the leader externally. Also since we want one node to continue to function while the other node is down we would need to apply a modification to the state before consensus occurs.
-
-
Constructor Summary
Constructors Constructor Description TwoNodeClusterRaftPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplyModificationToStateBeforeConsensus()booleanautomaticElectionsEnabled()
-
-
-
Method Detail
-
automaticElectionsEnabled
public boolean automaticElectionsEnabled()
- Specified by:
automaticElectionsEnabledin interfaceorg.opendaylight.controller.cluster.raft.policy.RaftPolicy
-
applyModificationToStateBeforeConsensus
public boolean applyModificationToStateBeforeConsensus()
- Specified by:
applyModificationToStateBeforeConsensusin interfaceorg.opendaylight.controller.cluster.raft.policy.RaftPolicy
-
-