List of usage examples for org.apache.zookeeper Watcher interface-usage
From source file org.apache.hoya.tools.ZKIntegration.java
public class ZKIntegration implements Watcher { /** * Base path for services */ public static String ZK_SERVICES = "services";
From source file org.apache.niolex.zookeeper.core.ZKConnector.java
/**
* The main Zookeeper connector, manage zookeeper and retry connection.
* We encapsulate the common add, update, delete and watch operations for Zookeeper.
* <br>
* If user want to operate on the raw Zookeeper, use {@link #zooKeeper()}.
*
From source file org.apache.niolex.zookeeper.watcher.RecoverableWatcher.java
/**
* The interface extends the standard ZK watcher, and add a new
* method for recover watcher when connection with ZK expired.
*
* @author <a href="mailto:xiejiyun@gmail.com">Xie, Jiyun</a>
* @version 1.0.5
From source file org.apache.pulsar.zookeeper.ZooKeeperCache.java
/**
* Per ZK client ZooKeeper cache supporting ZNode data and children list caches. A cache entry is identified, accessed
* and invalidated by the ZNode path. For the data cache, ZNode data parsing is done at request time with the given
* {@link Deserializer} argument.
*
* @param <T>
From source file org.apache.pulsar.zookeeper.ZooKeeperChildrenCache.java
/** * This class keeps a cache of the children for several z-nodes and updates it whenever it's changed on zookeeper. */ public class ZooKeeperChildrenCache implements Watcher, CacheUpdater<Set<String>> { private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperChildrenCache.class);
From source file org.apache.pulsar.zookeeper.ZooKeeperDataCache.java
/**
* Provides a generic cache for reading objects stored in zookeeper.
*
* Maintains the objects already serialized in memory and sets watches to receive changes notifications.
*
* @param <T>
From source file org.apache.pulsar.zookeeper.ZooKeeperSessionWatcher.java
/**
* A ZooKeeper watcher for the Pulsar instance.
*
* Monitor the ZK session state every few seconds. If the session is not in Connected state for a while, we will kill
* the process before the session is supposed to expire
*/
From source file org.apache.s4.comm.core.DefaultWatcher.java
public class DefaultWatcher implements Watcher { public static List<KeeperState> interestingStates = new ArrayList<KeeperState>(); static { interestingStates.add(KeeperState.Expired); interestingStates.add(KeeperState.SyncConnected);
From source file org.apache.s4.core.triggers.TriggerablePE.java
public class TriggerablePE extends ProcessingElement implements Watcher { private ZooKeeper zk; public TriggerablePE() { }
From source file org.apache.s4.wordcount.WordClassifierPE.java
public class WordClassifierPE extends ProcessingElement implements Watcher { TreeMap<String, Integer> counts = new TreeMap<String, Integer>(); private int counter; transient private ZooKeeper zk;