ClusterConfig
Describes the membership of a Raft cluster.
Voters (voters) participate in leader election and form the quorum for log commitment. A proposal is committed once quorumSize voters have replicated it. Quorum is majority: voters.size / 2 + 1.
Learners (learners) receive log replication from the leader but never vote, never stand for election, and never count toward quorum. They are useful for durable replicas that shouldn't influence availability — e.g. a read replica or an observer node.
Every node — voter or learner — must have a NodeId that is unique within the cluster and stable across restarts.
Factory shortcuts
Use ClusterConfig.ofVoters for a voters-only cluster, or ClusterConfig.withLearner to add a single non-voting learner.
Parameters
The set of nodes that vote and count toward quorum.
Non-voting nodes that receive replication. Defaults to empty.