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.twitter.distributedlog.impl.federated.FederatedZKLogMetadataStore.java

/**
 * A Federated ZooKeeper Based Log Metadata Store.
 *
 * To Upgrade a simple ZKLogMetadataStore to FederatedZKLogMetadataStore, following steps should be taken in sequence:
 * a) deploy the new code with disabling createStreamsIfNotExists in all writer.
 * b) once all proxies disable the flag, update namespace binding to enable federated namespace.

From source file com.twitter.distributedlog.impl.ZKLogSegmentMetadataStore.java

/**
 * ZooKeeper based log segment metadata store.
 */
public class ZKLogSegmentMetadataStore implements LogSegmentMetadataStore, Watcher, Children2Callback {

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

From source file com.twitter.distributedlog.impl.ZKNamespaceWatcher.java

/**
 * Watcher on watching a given namespace
 */
public class ZKNamespaceWatcher extends NamespaceWatcher
        implements Runnable, Watcher, AsyncCallback.Children2Callback {

From source file com.twitter.distributedlog.readahead.ReadAheadWorker.java

/**
 * ReadAhead Worker process readahead in asynchronous way. The whole readahead process are chained into
 * different phases:
 *
 * <p>
 * ScheduleReadAheadPhase: Schedule the readahead request based on previous state (e.g. whether to backoff).

From source file com.twitter.distributedlog.util.LimitedPermitManager.java

/**
 * Manager to control all the log segments rolling.
 */
public class LimitedPermitManager implements PermitManager, Runnable, Watcher {

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

From source file com.twitter.distributedlog.zk.ZKWatcherManager.java

/**
 * Watcher Manager to manage watchers.
 * <h3>Metrics</h3>
 * <ul>
 * <li> `total_watches`: total number of watches that managed by this watcher manager.
 * <li> `num_child_watches`: number of paths that are watched for children changes by this watcher manager.

From source file com.yahoo.pasc.paxos.Barrier.java

public class Barrier implements Watcher {
    private static final Logger LOG = LoggerFactory.getLogger(Barrier.class);

    private int size;
    private String name;
    private ZooKeeper zk;

From source file com.yahoo.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 com.yahoo.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 com.yahoo.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>