org.inria.myriads.snoozenode.groupmanager.leadelection.api.impl
public final class ZooKeeperLeaderElection extends Object implements LeaderElection, org.apache.zookeeper.Watcher, Runnable
Constructor and Description |
---|
ZooKeeperLeaderElection(ZooKeeperSettings zooKeeperParameters,
org.inria.myriads.snoozecommon.communication.groupmanager.GroupManagerDescription groupManagerDescription,
LeaderElectionListener listener)
Leader election based on ZooKeeper.
|
public ZooKeeperLeaderElection(ZooKeeperSettings zooKeeperParameters, org.inria.myriads.snoozecommon.communication.groupmanager.GroupManagerDescription groupManagerDescription, LeaderElectionListener listener) throws Exception
zooKeeperParameters
- The zookeeper parametersgroupManagerDescription
- The group manager descriptionlistener
- The leader election listenerException
public void process(org.apache.zookeeper.WatchedEvent event)
process
in interface org.apache.zookeeper.Watcher
event
- The watched eventpublic void start()
start
in interface LeaderElection
Copyright © 2013. All Rights Reserved.