Uses of Interface
org.apache.zookeeper.Watcher
-
Packages that use Watcher Package Description org.apache.zookeeper org.apache.zookeeper.admin org.apache.zookeeper.server ZooKeeper server theory of operation -
-
Uses of Watcher in org.apache.zookeeper
Methods in org.apache.zookeeper that return types with arguments of type Watcher Modifier and Type Method Description protected abstract java.util.Map<java.lang.String,java.util.Set<Watcher>>
ZooKeeper.WatchRegistration. getWatches(int rc)
java.util.Set<Watcher>
ClientWatchManager. materialize(Watcher.Event.KeeperState state, Watcher.Event.EventType type, java.lang.String path)
Return a set of watchers that should be notified of the event.java.util.Map<Watcher.Event.EventType,java.util.Set<Watcher>>
WatchDeregistration. unregister(int rc)
Unregistering watcher that was added on path.Methods in org.apache.zookeeper with parameters of type Watcher Modifier and Type Method Description org.apache.zookeeper.data.Stat
ZooKeeper. exists(java.lang.String path, Watcher watcher)
Return the stat of the node of the given path.void
ZooKeeper. exists(java.lang.String path, Watcher watcher, AsyncCallback.StatCallback cb, java.lang.Object ctx)
The asynchronous version of exists.java.util.List<java.lang.String>
ZooKeeper. getChildren(java.lang.String path, Watcher watcher)
Return the list of the children of the node of the given path.void
ZooKeeper. getChildren(java.lang.String path, Watcher watcher, AsyncCallback.Children2Callback cb, java.lang.Object ctx)
The asynchronous version of getChildren.void
ZooKeeper. getChildren(java.lang.String path, Watcher watcher, AsyncCallback.ChildrenCallback cb, java.lang.Object ctx)
The asynchronous version of getChildren.java.util.List<java.lang.String>
ZooKeeper. getChildren(java.lang.String path, Watcher watcher, org.apache.zookeeper.data.Stat stat)
For the given znode path return the stat and children list.void
ZooKeeper. getConfig(Watcher watcher, AsyncCallback.DataCallback cb, java.lang.Object ctx)
The asynchronous version of getConfig.byte[]
ZooKeeper. getConfig(Watcher watcher, org.apache.zookeeper.data.Stat stat)
Return the last committed configuration (as known to the server to which the client is connected) and the stat of the configuration.void
ZooKeeper. getData(java.lang.String path, Watcher watcher, AsyncCallback.DataCallback cb, java.lang.Object ctx)
The asynchronous version of getData.byte[]
ZooKeeper. getData(java.lang.String path, Watcher watcher, org.apache.zookeeper.data.Stat stat)
Return the data and the stat of the node of the given path.void
ZooKeeper. register(Watcher watcher)
Specify the default watcher for the connection (overrides the one specified during construction).void
ZooKeeper. removeWatches(java.lang.String path, Watcher watcher, Watcher.WatcherType watcherType, boolean local)
For the given znode path, removes the specified watcher of given watcherType.void
ZooKeeper. removeWatches(java.lang.String path, Watcher watcher, Watcher.WatcherType watcherType, boolean local, AsyncCallback.VoidCallback cb, java.lang.Object ctx)
The asynchronous version of removeWatches.Constructors in org.apache.zookeeper with parameters of type Watcher Constructor Description WatchDeregistration(java.lang.String clientPath, Watcher watcher, Watcher.WatcherType watcherType, boolean local, org.apache.zookeeper.ZooKeeper.ZKWatchManager zkManager)
WatchRegistration(Watcher watcher, java.lang.String clientPath)
ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, java.lang.String clusterName)
ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, HostProvider aHostProvider)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, HostProvider aHostProvider, ZKClientConfig clientConfig)
ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, HostProvider aHostProvider, ZKClientConfig clientConfig, java.lang.String aClusterName)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, ZKClientConfig conf)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd, boolean canBeReadOnly)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd, boolean canBeReadOnly, HostProvider aHostProvider)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd, boolean canBeReadOnly, HostProvider aHostProvider, ZKClientConfig clientConfig)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server.ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, java.lang.String clusterName)
ZooKeeper(java.lang.String connectString, int sessionTimeout, Watcher watcher, ZKClientConfig conf)
To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. -
Uses of Watcher in org.apache.zookeeper.admin
Constructors in org.apache.zookeeper.admin with parameters of type Watcher Constructor Description ZooKeeperAdmin(java.lang.String connectString, int sessionTimeout, Watcher watcher)
Create a ZooKeeperAdmin object which is used to perform dynamic reconfiguration operations.ZooKeeperAdmin(java.lang.String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly)
Create a ZooKeeperAdmin object which is used to perform dynamic reconfiguration operations.ZooKeeperAdmin(java.lang.String connectString, int sessionTimeout, Watcher watcher, ZKClientConfig conf)
Create a ZooKeeperAdmin object which is used to perform dynamic reconfiguration operations. -
Uses of Watcher in org.apache.zookeeper.server
Classes in org.apache.zookeeper.server that implement Watcher Modifier and Type Class Description class
NettyServerCnxn
class
NIOServerCnxn
This class handles communication with clients using NIO.class
ServerCnxn
Interface to a Server connection - represents a connection from a client to the server.Methods in org.apache.zookeeper.server with parameters of type Watcher Modifier and Type Method Description boolean
DataTree. containsWatcher(java.lang.String path, Watcher.WatcherType type, Watcher watcher)
boolean
ZKDatabase. containsWatcher(java.lang.String path, Watcher.WatcherType type, Watcher watcher)
Check whether the given watcher exists in datatreejava.util.List<java.lang.String>
DataTree. getChildren(java.lang.String path, org.apache.zookeeper.data.Stat stat, Watcher watcher)
java.util.List<java.lang.String>
ZKDatabase. getChildren(java.lang.String path, org.apache.zookeeper.data.Stat stat, Watcher watcher)
get children list for this pathbyte[]
DataTree. getData(java.lang.String path, org.apache.zookeeper.data.Stat stat, Watcher watcher)
byte[]
ZKDatabase. getData(java.lang.String path, org.apache.zookeeper.data.Stat stat, Watcher watcher)
get data and stat for a pathvoid
DataTree. removeCnxn(Watcher watcher)
boolean
DataTree. removeWatch(java.lang.String path, Watcher.WatcherType type, Watcher watcher)
boolean
ZKDatabase. removeWatch(java.lang.String path, Watcher.WatcherType type, Watcher watcher)
Remove watch from the datatreevoid
DataTree. setWatches(long relativeZxid, java.util.List<java.lang.String> dataWatches, java.util.List<java.lang.String> existWatches, java.util.List<java.lang.String> childWatches, Watcher watcher)
void
ZKDatabase. setWatches(long relativeZxid, java.util.List<java.lang.String> dataWatches, java.util.List<java.lang.String> existWatches, java.util.List<java.lang.String> childWatches, Watcher watcher)
set watches on the datatreeorg.apache.zookeeper.data.Stat
DataTree. statNode(java.lang.String path, Watcher watcher)
-