public class Follower extends Object
Modifier and Type | Field and Description |
---|---|
static Comparator<Follower> |
SORT_BY_IDENTITY
Sorts instances by their identities.
|
Modifier and Type | Method and Description |
---|---|
String |
getAddress()
Get the address of this follower.
|
String |
getIdentity()
Get the identity of this follower.
|
long |
getLeaderCommit()
Get the leader commit index most recently sent to this follower.
|
Timestamp |
getLeaderTimestamp()
Get the most recent (leader's) request timestamp returned by this follower in a response, if any.
|
long |
getMatchIndex()
Get the index of the highest log entry in the follower's log known to match the leader's log.
|
long |
getNextIndex()
Get the index of the next log entry to send to this follower.
|
Timestamp |
getSnapshotTimestamp()
Get the (leader's) timestamp of the most recent snapshot install sent to this follower, if any.
|
boolean |
isReceivingSnapshot()
Determine whether this follower is currently being sent a whole database snapshot download.
|
boolean |
isSynced()
Determine whether we believe this follower is "synchronized".
|
String |
toString() |
public static final Comparator<Follower> SORT_BY_IDENTITY
public String getIdentity()
public String getAddress()
public long getNextIndex()
public long getMatchIndex()
public Timestamp getLeaderTimestamp()
public Timestamp getSnapshotTimestamp()
public long getLeaderCommit()
public boolean isSynced()
By "synchronized" we mean the most recently received AppendResponse
indicated a successful match of the previous log entry. We only send "probes" to unsynchronized followers.
public boolean isReceivingSnapshot()
Copyright © 2022. All rights reserved.