2 * Copyright (c) 2014 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
8 package org.opendaylight.controller.cluster.raft;
10 import scala.concurrent.duration.FiniteDuration;
13 * Configuration Parameter interface for configuring the Raft consensus system
15 * Any component using this implementation might want to provide an implementation of
16 * this interface to configure
18 * A default implementation will be used if none is provided.
20 * @author Kamal Rameshan
22 public interface ConfigParams {
24 * The minimum number of entries to be present in the in-memory Raft log
25 * for a snapshot to be taken
29 public long getSnapshotBatchCount();
32 * The interval at which a heart beat message will be sent to the remote
35 * @return FiniteDuration
37 public FiniteDuration getHeartBeatInterval();
40 * The interval in which a new election would get triggered if no leader is found
42 * Normally its set to atleast twice the heart beat interval
44 * @return FiniteDuration
46 public FiniteDuration getElectionTimeOutInterval();
49 * The maximum election time variance. The election is scheduled using both
50 * the Election Timeout and Variance
54 public int getElectionTimeVariance();
57 * The size (in bytes) of the snapshot chunk sent from Leader
59 public int getSnapshotChunkSize();