2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.datastore.policy;
11 import org.opendaylight.controller.cluster.raft.policy.RaftPolicy;
14 * The TwoNodeClusterRaftPolicy is intended to be used in a two node deployment where when one instance
15 * of the controller goes down the other instance is to take over and move the state forward.
16 * When a TwoNodeClusterRaftPolicy is used Raft elections are disabled. This is primarily because we would
17 * need to specify the leader externally. Also since we want one node to continue to function while the other
18 * node is down we would need to apply a modification to the state before consensus occurs.
20 public class TwoNodeClusterRaftPolicy implements RaftPolicy {
22 public boolean automaticElectionsEnabled() {
27 public boolean applyModificationToStateBeforeConsensus() {