public class LeaderState extends Object
FollowerState
object for each follower.FollowerState
Modifier and Type | Method and Description |
---|---|
void |
add(RaftEndpoint follower,
long lastLogIndex)
Add a new follower with the leader's
lastLogIndex . |
long |
flushedLogIndex() |
void |
flushedLogIndex(long flushedLogIndex) |
FollowerState |
getFollowerState(RaftEndpoint follower) |
Map<RaftEndpoint,FollowerState> |
getFollowerStates() |
long |
majorityAppendRequestAckTimestamp(int majority)
Returns the earliest append response ack timestamp of the majority nodes
|
long[] |
matchIndices()
Returns an array of match indices for all followers.
|
long |
queryRound() |
QueryState |
queryState() |
void |
remove(RaftEndpoint follower)
Removes a follower from leader maintained state.
|
public void add(RaftEndpoint follower, long lastLogIndex)
lastLogIndex
.
Follower's nextIndex
will be set to lastLogIndex + 1
and matchIndex
to 0.public void remove(RaftEndpoint follower)
public long[] matchIndices()
public FollowerState getFollowerState(RaftEndpoint follower)
public Map<RaftEndpoint,FollowerState> getFollowerStates()
public QueryState queryState()
public long queryRound()
public void flushedLogIndex(long flushedLogIndex)
public long flushedLogIndex()
public long majorityAppendRequestAckTimestamp(int majority)
Copyright © 2019 Hazelcast, Inc.. All rights reserved.