Abstraction to select a "leader" amongst multiple contenders in a group of JMVs connected to a Zookeeper cluster. If a group of N thread/processes contends for leadership, one will be assigned leader until it releases leadership at which time another one from the group will be chosen.
Note that this class uses an underlying {@link InterProcessMutex} and as a result leaderelection is "fair" - each user will become leader in the order originally requested (from ZK's point of view).
|
|
|
|