public class LeaderState extends Object
FollowerState
object for each follower.FollowerState
Modifier and Type | Method and Description |
---|---|
void |
add(Endpoint follower,
long lastLogIndex)
Add a new follower with the leader's
lastLogIndex . |
FollowerState |
getFollowerState(Endpoint follower) |
Map<Endpoint,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.
|
void |
remove(Endpoint follower)
Removes a follower from leader maintained state.
|
public void add(Endpoint follower, long lastLogIndex)
lastLogIndex
.
Follower's nextIndex
will be set to lastLogIndex + 1
and matchIndex
to 0.public void remove(Endpoint follower)
public long[] matchIndices()
public FollowerState getFollowerState(Endpoint follower)
public Map<Endpoint,FollowerState> getFollowerStates()
public long majorityAppendRequestAckTimestamp(int majority)
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.