Example usage for org.apache.zookeeper Watcher interface-usage

List of usage examples for org.apache.zookeeper Watcher interface-usage

Introduction

In this page you can find the example usage for org.apache.zookeeper Watcher interface-usage.

Usage

From source file com.demo.master_work.Client.java

public class Client implements Watcher, Closeable {
    private static final Logger LOG = LoggerFactory.getLogger(Master.class);

    ZooKeeper zk;
    String hostPort;
    volatile boolean connected = false;

From source file com.dianping.lion.client.zookeeper.SessionRecoverableZookeeper.java

/**
 * TODO Comment of SessionRecoverableZookeeper
 * @author danson.liu
 *
 */
public class SessionRecoverableZookeeper implements Watcher {

From source file com.digitgroup.fullstackroad.j2ee.zookeeper.Client.java

public class Client implements Watcher, Closeable {
    private static final Logger LOG = LoggerFactory.getLogger(Master.class);

    ZooKeeper zk;
    String hostPort;
    volatile boolean connected = false;

From source file com.digitgroup.fullstackroad.j2ee.zookeeper.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.digitgroup.fullstackroad.j2ee.zookeeper.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());

From source file com.discovery.darchrow.lock.DistributedLock.java

public class DistributedLock implements Lock, Watcher {
    private ZooKeeper zk;
    private String root = "/locks";//
    private String lockName;//?
    private String waitNode;//??
    private String myZnode;//??

From source file com.dobrunov.zktreeutil.zkDumpZookeeper.java

public class zkDumpZookeeper implements Watcher {
    private String zkServer;
    private String start_znode;
    private TreeNode<zNode> zktree = null;
    private ZooKeeper zk = null;
    private final org.slf4j.Logger logger;

From source file com.doctor.zookeeper.api.Practice.java

/**
 * @author doctor
 *
 * @time 2015823 ?11:53:56
 */
public class Practice implements Watcher {

From source file com.ebay.jetstream.messaging.transport.zookeeper.ZooKeeperTransport.java

/**
 * 
 * Transport implements/acts as a multicast service with underlying zookeeper
 * group membership service
 * 
 * @author rmuthupandian

From source file com.ebay.jetstream.messaging.zookeeper.lp.Consumer.java

public class Consumer implements Watcher, ConnectionStateListener, BackgroundCallback {

    private CuratorFramework connection;
    private long nodecreated = 0;
    private long childrenChanged = 0;
    private long datachanged = 0;