org.apache.helix.manager.zk.ZkClient.unsubscribeDataChanges()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(150)

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

ZkClient.unsubscribeDataChanges介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-pinot

_zkClient.subscribeDataChanges(segmentPath, this);
} else {
 _zkClient.unsubscribeDataChanges(segmentPath, this);

代码示例来源:origin: org.apache.helix/helix-core

/**
 * Unsubscribe to zookeeper data changes
 */
@Override
public void unsubscribeDataChanges(String path, IZkDataListener dataListener) {
 _zkClient.unsubscribeDataChanges(path, dataListener);
}

代码示例来源:origin: org.apache.helix/helix-core

@Override
public void handleDataDeleted(String dataPath) throws Exception {
 _zkclient.unsubscribeDataChanges(dataPath, this);
}

代码示例来源:origin: org.apache.helix/helix-core

@Override
public void handleDataDeleted(String dataPath) throws Exception {
 _zkClient.unsubscribeDataChanges(dataPath, this);
 if (!_verifyTaskThreadPool.isShutdown()) {
  _verifyTaskThreadPool.submit(new VerifyStateCallbackTask());
 }
}

代码示例来源:origin: org.apache.helix/helix-core

private void subscribeDataChange(String path, NotificationContext.Type callbackType) {
 if (callbackType == NotificationContext.Type.INIT
   || callbackType == NotificationContext.Type.CALLBACK) {
  if (logger.isDebugEnabled()) {
   logger.debug(
     _manager.getInstanceName() + " subscribe data-change. path: " + path + ", listener: "
       + _listener);
  }
  _zkClient.subscribeDataChanges(path, this);
 } else if (callbackType == NotificationContext.Type.FINALIZE) {
  logger.info(
    _manager.getInstanceName() + " unsubscribe data-change. path: " + path + ", listener: "
      + _listener);
  _zkClient.unsubscribeDataChanges(path, this);
 }
}

代码示例来源:origin: org.apache.helix/helix-core

@Override
public void handleDataDeleted(String dataPath) {
 if (logger.isDebugEnabled()) {
  logger.debug("Data change callback: path deleted: " + dataPath);
 }
 try {
  updateNotificationTime(System.nanoTime());
  if (dataPath != null && dataPath.startsWith(_path)) {
   logger.info(_manager.getInstanceName() + " unsubscribe data-change. path: " + dataPath
     + ", listener: " + _listener);
   _zkClient.unsubscribeDataChanges(dataPath, this);
   // only needed for bucketized parent, but OK if we don't have child-change
   // watch on the bucketized parent path
   logger.info(_manager.getInstanceName() + " unsubscribe child-change. path: " + dataPath
     + ", listener: " + _listener);
   _zkClient.unsubscribeChildChanges(dataPath, this);
   // No need to invoke() since this event will handled by child-change on parent-node
  }
 } catch (Exception e) {
  String msg = "exception in handling data-delete-change. path: " + dataPath + ", listener: "
    + _listener;
  ZKExceptionHandler.getInstance().handle(msg, e);
 }
}

代码示例来源:origin: org.apache.helix/helix-core

for (String child : zkClient.getChildren(extViewPath)) {
 String childPath = extViewPath.equals("/") ? extViewPath + child : extViewPath + "/" + child;
 zkClient.unsubscribeDataChanges(childPath, listener);

代码示例来源:origin: apache/helix

"ZooKeeper#watchManager#childWatches should have 1 child watch on path: " + path);
client.unsubscribeDataChanges(path, listener);
client.unsubscribeChildChanges(path, listener);

相关文章