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 org.apache.cassandra.mutex.ClusterMutex.java

public class ClusterMutex implements Watcher {
    private static Logger logger = Logger.getLogger(ClusterMutex.class);

    private static ClusterMutex instance;

    // Lazy on purpose. People who do not want mutex, should not need to have to worry about ZK

From source file org.apache.cassandra.service.ZookeeperWatcher.java

public class ZookeeperWatcher implements Watcher {
    private static final Logger logger_ = Logger.getLogger(ZookeeperWatcher.class);
    private static final String leader_ = "/Cassandra/" + DatabaseDescriptor.getClusterName() + "/Leader";
    private static final String lock_ = "/Cassandra/" + DatabaseDescriptor.getClusterName() + "/Locks";

    public void process(WatchedEvent we) {

From source file org.apache.curator.ConnectionState.java

class ConnectionState implements Watcher, Closeable {
    private static final int MAX_BACKGROUND_EXCEPTIONS = 10;
    private static final boolean LOG_EVENTS = Boolean.getBoolean(DebugUtils.PROPERTY_LOG_EVENTS);
    private static final Logger log = LoggerFactory.getLogger(ConnectionState.class);
    private final HandleHolder zooKeeper;
    private final AtomicBoolean isConnected = new AtomicBoolean(false);

From source file org.apache.curator.framework.imps.NamespaceWatcher.java

class NamespaceWatcher implements Watcher, Closeable {
    private volatile CuratorFrameworkImpl client;
    private volatile Watcher actualWatcher;
    private volatile CuratorWatcher curatorWatcher;

    NamespaceWatcher(CuratorFrameworkImpl client, Watcher actualWatcher) {

From source file org.apache.curator.x.async.details.InternalWatcher.java

class InternalWatcher implements Watcher {
    private final WatchMode watchMode;
    private final UnaryOperator<WatchedEvent> watcherFilter;
    private volatile CompletableFuture<WatchedEvent> future = new CompletableFuture<>();

    InternalWatcher(WatchMode watchMode, UnaryOperator<WatchedEvent> watcherFilter) {

From source file org.apache.curator.x.rpc.details.RpcWatcher.java

public class RpcWatcher implements Watcher {
    private final CuratorProjection projection;
    private final CuratorProjectionService projectionService;

    public RpcWatcher(CuratorProjectionService projectionService, CuratorProjection projection) {
        this.projection = projection;

From source file org.apache.cxf.dosgi.discovery.zookeeper.InterfaceMonitor.java

public class InterfaceMonitor implements Watcher, StatCallback {
    private static final Logger LOG = Logger.getLogger(InterfaceMonitor.class.getName());

    InterfaceDataMonitorListenerImpl listener;
    final String znode;
    final ZooKeeper zookeeper;

From source file org.apache.cxf.dosgi.discovery.zookeeper.subscribe.InterfaceMonitor.java

/**
 * Monitors ZooKeeper for changes in published endpoints.
 * <p>
 * Specifically, it monitors the node path associated with a given interface class,
 * whose data is a serialized version of an EndpointDescription, and notifies an
 * EndpointListener when changes are detected (which can then propagate the

From source file org.apache.cxf.dosgi.discovery.zookeeper.ZooKeeperDiscovery.java

public class ZooKeeperDiscovery implements Watcher, ManagedService {

    public static final String DISCOVERY_ZOOKEEPER_ID = "org.apache.cxf.dosgi.discovery.zookeeper";

    private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperDiscovery.class);

From source file org.apache.distributedlog.impl.acl.ZKAccessControlManager.java

/**
 * ZooKeeper Based {@link org.apache.distributedlog.acl.AccessControlManager}.
 */
public class ZKAccessControlManager implements AccessControlManager, Watcher {

    private static final Logger logger = LoggerFactory.getLogger(ZKAccessControlManager.class);