List of usage examples for org.apache.zookeeper Watcher interface-usage
From source file com.github.liyp.zk.demo.ZkElector.java
/**
* ZKManager elects the leader to process OA publishing tasks handler.
* <p/>
* <p>
* Election Algorithms description:
* </p>
From source file com.github.zkclient.ZkClient.java
/**
* Zookeeper client
* <p>
* The client is thread-safety
* </p>
*/
From source file com.glaf.cluster.catalina.session.ConnectionWatcher.java
public class ConnectionWatcher implements Watcher { private static Log log = LogFactory.getLog(ConnectionWatcher.class); private CountDownLatch signal = new CountDownLatch(1); private static final int SESSION_TIMEOUT = 60000;
From source file com.glaf.core.test.zookeeper.ConfigWatcher.java
public class ConfigWatcher implements Watcher { private ActiveKeyValueStore store; public ConfigWatcher(String hosts) throws IOException, InterruptedException { store = new ActiveKeyValueStore();
From source file com.glaf.core.test.zookeeper.ConnectionWatcher.java
public class ConnectionWatcher implements Watcher { private static final int SESSION_TIMEOUT = 5000; protected ZooKeeper zk;
From source file com.glaf.core.test.zookeeper.CreateGroup.java
public class CreateGroup implements Watcher { private static final int SESSION_TIMEOUT = 5000; private ZooKeeper zk; private CountDownLatch connectedSignal = new CountDownLatch(1);
From source file com.guang.eunormia.common.dislock.ZKClient.java
/**
*
* @author ferdi email:ferdi@blueferdi.com
* @since Jul 1, 2013 3:28:41 PM
* @version 0.0.1
*/
From source file com.gxl.shark.resources.watcher.ZookeeperWatcher.java
/**
* sharding???zookeeperwatcher
*
* @author gaoxianglong
*
* @version 1.3.7
From source file com.hagibidaba.zk.workers.Master.java
/**
* This class implements the master of the master-worker example we use
* throughout the book. The master is responsible for tracking the list of
* available workers, determining when there are new tasks and assigning
* them to available workers.
*
From source file com.hagibidaba.zk.workers.Worker.java
public class Worker implements Watcher, Closeable { private static final Logger LOG = LoggerFactory.getLogger(Worker.class); private ZooKeeper zk; private String hostPort; private String serverId = Integer.toHexString((new Random()).nextInt());