Class RandomSingletonElectionPolicy
- java.lang.Object
-
- org.wildfly.clustering.singleton.election.RandomSingletonElectionPolicy
-
- All Implemented Interfaces:
SingletonElectionPolicy
public class RandomSingletonElectionPolicy extends Object implements SingletonElectionPolicy
SingletonElectionPolicythat elects a random member.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description RandomSingletonElectionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Nodeelect(List<Node> nodes)Elect a single node from the specified list of candidate nodes.
-
-
-
Method Detail
-
elect
public Node elect(List<Node> nodes)
Elect a single node from the specified list of candidate nodes.- Specified by:
electin interfaceSingletonElectionPolicy- Parameters:
nodes- a list of candidate nodes.- Returns:
- the elected node
-
-