public interface ElectionStrategy
Node elect(Set<Node> candidates, Node suggested, Set<Node> active, Set<Node> configured)
null
if the
cluster should remain without a leader. For example, in the event of a
network partition the sub-cluster with quorum could elect a leader
while any sub-cluster with no quorum could remain without a leader. Or
a leader could be elected on each sub-cluster. It is up to the
strategy.candidates
- potential leaders in the current clustersuggested
- suggested leader, null
if no suggestion. The
suggested leader is part of the candidates
, and it
normally represents the current leader. A suggested node is used
when the election is run because a node left the cluster
(Election must be run again because strategies could verify
quorum).active
- the nodes currently active (Reachable nodes)configured
- the nodes that were used to configure the clusternull
if the cluster should remain without a
leaderCopyright © 2015. All Rights Reserved.