public static interface RaftServerConfigKeys.LeaderElection
| 限定符和类型 | 字段和说明 |
|---|---|
static TimeDuration |
LEADER_STEP_DOWN_WAIT_TIME_DEFAULT |
static String |
LEADER_STEP_DOWN_WAIT_TIME_KEY |
static boolean |
MEMBER_MAJORITY_ADD_DEFAULT |
static String |
MEMBER_MAJORITY_ADD_KEY
Does it allow majority-add, i.e. adding a majority of members in a single setConf?
|
static boolean |
PRE_VOTE_DEFAULT |
static String |
PRE_VOTE_KEY |
static String |
PREFIX |
| 限定符和类型 | 方法和说明 |
|---|---|
static TimeDuration |
leaderStepDownWaitTime(RaftProperties properties) |
static boolean |
memberMajorityAdd(RaftProperties properties) |
static boolean |
preVote(RaftProperties properties) |
static void |
setLeaderStepDownWaitTime(RaftProperties properties,
TimeDuration leaderStepDownWaitTime) |
static void |
setMemberMajorityAdd(RaftProperties properties,
boolean enableMemberMajorityAdd) |
static void |
setPreVote(RaftProperties properties,
boolean enablePreVote) |
static final String PREFIX
static final String LEADER_STEP_DOWN_WAIT_TIME_KEY
static final TimeDuration LEADER_STEP_DOWN_WAIT_TIME_DEFAULT
static final String PRE_VOTE_KEY
static final boolean PRE_VOTE_DEFAULT
static final String MEMBER_MAJORITY_ADD_KEY
Note that, when a single setConf removes and adds members at the same time, the majority is counted after the removal. For examples, setConf to a 3-member group by adding 2 new members is NOT a majority-add. However, setConf to a 3-member group by removing 2 of members and adding 2 new members is a majority-add.
Note also that adding 1 new member to an 1-member group is always allowed, although it is a majority-add.
static final boolean MEMBER_MAJORITY_ADD_DEFAULT
static TimeDuration leaderStepDownWaitTime(RaftProperties properties)
static void setLeaderStepDownWaitTime(RaftProperties properties, TimeDuration leaderStepDownWaitTime)
static boolean preVote(RaftProperties properties)
static void setPreVote(RaftProperties properties, boolean enablePreVote)
static boolean memberMajorityAdd(RaftProperties properties)
static void setMemberMajorityAdd(RaftProperties properties, boolean enableMemberMajorityAdd)
Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.