本文整理了Java中org.apache.helix.manager.zk.ZkClient.unsubscribeChildChanges()
方法的一些代码示例,展示了ZkClient.unsubscribeChildChanges()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkClient.unsubscribeChildChanges()
方法的具体详情如下:
包路径:org.apache.helix.manager.zk.ZkClient
类名称:ZkClient
方法名:unsubscribeChildChanges
暂无
代码示例来源:origin: org.apache.helix/helix-core
/**
* Unsubscrie to zookeeper data changes
*/
@Override
public void unsubscribeChildChanges(String path, IZkChildListener childListener) {
_zkClient.unsubscribeChildChanges(path, childListener);
}
代码示例来源:origin: org.apache.helix/helix-core
private void subscribeChildChange(String path, NotificationContext.Type callbackType) {
if (callbackType == NotificationContext.Type.INIT
|| callbackType == NotificationContext.Type.CALLBACK) {
if (logger.isDebugEnabled()) {
logger.debug(
_manager.getInstanceName() + " subscribes child-change. path: " + path + ", listener: " + _listener);
}
_zkClient.subscribeChildChanges(path, this);
} else if (callbackType == NotificationContext.Type.FINALIZE) {
logger.info(
_manager.getInstanceName() + " unsubscribe child-change. path: " + path + ", listener: " + _listener);
_zkClient.unsubscribeChildChanges(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
zkClient.unsubscribeChildChanges(extViewPath, listener);
for (String child : zkClient.getChildren(extViewPath)) {
String childPath = extViewPath.equals("/") ? extViewPath + child : extViewPath + "/" + child;
代码示例来源:origin: apache/helix
client.unsubscribeChildChanges(path, listener);
内容来源于网络,如有侵权,请联系作者删除!