public class LeaderSnapshot extends Object
Modifier and Type | Method and Description |
---|---|
LogIndex |
getCommitted()
Get state the leader knows is committed on a majority of participant
replicas
|
LogIndex |
getHead()
Get end of the leader's log
|
Collection<ReplicaSnapshot> |
getReplicas()
Get unmodifiable view of configured replicas.
|
KetchLeader.State |
getState()
Get current state of the leader.
|
long |
getTerm()
Get term of this leader
|
boolean |
isIdle()
Whether the leader is not running a round to reach consensus, and has no
rounds queued.
|
String |
toString() |
public Collection<ReplicaSnapshot> getReplicas()
public KetchLeader.State getState()
public boolean isIdle()
true
if the leader is not running a round to reach
consensus, and has no rounds queued.public long getTerm()
getState()
is
currently
KetchLeader.State.LEADER
.@Nullable public LogIndex getHead()
@Nullable public LogIndex getCommitted()
Copyright © 2020 Eclipse JGit Project. All rights reserved.