Class RandomSingletonElectionPolicy

java.lang.Object
org.wildfly.clustering.singleton.election.RandomSingletonElectionPolicy
All Implemented Interfaces:
SingletonElectionPolicy

public class RandomSingletonElectionPolicy extends Object implements SingletonElectionPolicy
SingletonElectionPolicy that elects a random member.
Author:
Paul Ferraro
  • Constructor Details

    • RandomSingletonElectionPolicy

      public RandomSingletonElectionPolicy()
  • Method Details

    • elect

      public Node elect(List<Node> nodes)
      Elect a single node from the specified list of candidate nodes.
      Specified by:
      elect in interface SingletonElectionPolicy
      Parameters:
      nodes - a list of candidate nodes.
      Returns:
      the elected node