public interface RaftConfiguration
RaftGroup.
The configuration of a cluster may change from time to time.
In a configuration,
- the peers are voting members such as LEADER, CANDIDATE and FOLLOWER;
- the listeners are non-voting members.
This class captures the current configuration and the previous configuration of a cluster.
The objects of this class are immutable.RaftProtos.RaftPeerRole| 限定符和类型 | 方法和说明 |
|---|---|
default Collection<RaftPeer> |
getAllPeers()
The same as getAllPeers(RaftPeerRole.FOLLOWER).
|
Collection<RaftPeer> |
getAllPeers(org.apache.ratis.proto.RaftProtos.RaftPeerRole role) |
default Collection<RaftPeer> |
getCurrentPeers()
The same as getCurrentPeers(RaftPeerRole.FOLLOWER).
|
Collection<RaftPeer> |
getCurrentPeers(org.apache.ratis.proto.RaftProtos.RaftPeerRole roles) |
long |
getLogEntryIndex() |
RaftPeer |
getPeer(RaftPeerId id,
org.apache.ratis.proto.RaftProtos.RaftPeerRole... roles) |
default Collection<RaftPeer> |
getPreviousPeers()
The same as getPreviousPeers(RaftPeerRole.FOLLOWER).
|
Collection<RaftPeer> |
getPreviousPeers(org.apache.ratis.proto.RaftProtos.RaftPeerRole roles) |
RaftPeer getPeer(RaftPeerId id, org.apache.ratis.proto.RaftProtos.RaftPeerRole... roles)
default Collection<RaftPeer> getAllPeers()
Collection<RaftPeer> getAllPeers(org.apache.ratis.proto.RaftProtos.RaftPeerRole role)
default Collection<RaftPeer> getCurrentPeers()
Collection<RaftPeer> getCurrentPeers(org.apache.ratis.proto.RaftProtos.RaftPeerRole roles)
default Collection<RaftPeer> getPreviousPeers()
Collection<RaftPeer> getPreviousPeers(org.apache.ratis.proto.RaftProtos.RaftPeerRole roles)
long getLogEntryIndex()
Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.