Class 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 Detail

      • TwoNodeClusterRaftPolicy

        public TwoNodeClusterRaftPolicy()
    • Method Detail

      • automaticElectionsEnabled

        public boolean automaticElectionsEnabled()
        Specified by:
        automaticElectionsEnabled in interface org.opendaylight.controller.cluster.raft.policy.RaftPolicy
      • applyModificationToStateBeforeConsensus

        public boolean applyModificationToStateBeforeConsensus()
        Specified by:
        applyModificationToStateBeforeConsensus in interface org.opendaylight.controller.cluster.raft.policy.RaftPolicy