gpt4 book ai didi

org.lilyproject.util.zookeeper.ZooKeeperItf.removeDefaultWatcher()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 20:42:49 26 4
gpt4 key购买 nike

本文整理了Java中org.lilyproject.util.zookeeper.ZooKeeperItf.removeDefaultWatcher()方法的一些代码示例,展示了ZooKeeperItf.removeDefaultWatcher()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperItf.removeDefaultWatcher()方法的具体详情如下:
包路径:org.lilyproject.util.zookeeper.ZooKeeperItf
类名称:ZooKeeperItf
方法名:removeDefaultWatcher

ZooKeeperItf.removeDefaultWatcher介绍

[英]Removes a default watcher added via #addDefaultWatcher.

This is a Lily-specific method.
[中]删除通过#addDefaultWatcher添加的默认观察者。
这是一种百合特有的方法。

代码示例

代码示例来源:origin: NGDATA/lilyproject

@Override
public void removeDefaultWatcher(Watcher watcher) {
  wrapped.removeDefaultWatcher(watcher);
}

代码示例来源:origin: NGDATA/lilyproject

public void close() {
  zk.removeDefaultWatcher(zkWatcher);
  closed = true;
}

代码示例来源:origin: NGDATA/lilyproject

@Override
@PreDestroy
public void close() throws IOException {
  try {
    zooKeeper.removeDefaultWatcher(connectionWatcher);
    cacheRefresher.stop();
  } catch (InterruptedException e) {
    Thread.currentThread().interrupt();
    log.debug("Interrupted", e);
  }
}

代码示例来源:origin: NGDATA/lilyproject

public void stop() throws InterruptedException {
  // Note that ZooKeeper does not have a way to remove watches (see ZOOKEEPER-422)
  stopped = true;
  zk.removeDefaultWatcher(connectStateWatcher);
  leaderProvisioner.shutdown();
  if (leaderProvisioner.currentState == LeaderState.I_AM_LEADER) {
    try {
      callback.deactivateAsLeader();
    } catch (InterruptedException e) {
      throw e;
    } catch (Throwable t) {
      log.error("Error stopping the leader for " + position, t);
    }
  }
}

代码示例来源:origin: NGDATA/lilyproject

@Override
public void close() throws IOException {
  this.isClosed = true;
  zk.removeDefaultWatcher(watcher);
  schemaCache.close();
  synchronized (this) {
    for (ServerNode node : servers) {
      node.close();
    }
    servers.clear();
  }
  if (managedZk && zk != null) {
    zk.close();
  }
  // Close pools related to the Configuration objects managed by this LilyClient instance
  for (Configuration config : hbaseConnections.getConfigurations()) {
    LocalHTable.closePool(config);
  }
  // Close HBase connections created by [only] this LilyClient instance.
  // This will almost always contain only one connection, if not we would need a more
  // advanced connection mgmt so that these connections don't stay open for the lifetime
  // of LilyClient.
  Closer.close(hbaseConnections);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com