public abstract class AbstractListener extends Object implements IZkChildListener, IZkDataListener, IZkStateListener
IZkChildListener,
IZkDataListener,
IZkStateListener| 构造器和说明 |
|---|
AbstractListener() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
handleChildChange(String parentPath,
List<String> currentChildren)
Called when the children of the given path changed.
|
void |
handleDataChange(String dataPath,
byte[] data) |
void |
handleDataDeleted(String dataPath) |
void |
handleNewSession()
Called after the zookeeper session has expired and a new session has been created.
|
void |
handleStateChanged(org.apache.zookeeper.Watcher.Event.KeeperState state)
Called when the zookeeper connection state has changed.
|
public void handleStateChanged(org.apache.zookeeper.Watcher.Event.KeeperState state)
throws Exception
IZkStateListenerhandleStateChanged 在接口中 IZkStateListenerstate - The new state.Exception - On any error.public void handleNewSession()
throws Exception
IZkStateListenerhandleNewSession 在接口中 IZkStateListenerException - On any error.public void handleDataChange(String dataPath, byte[] data) throws Exception
handleDataChange 在接口中 IZkDataListenerExceptionpublic void handleDataDeleted(String dataPath) throws Exception
handleDataDeleted 在接口中 IZkDataListenerExceptionpublic void handleChildChange(String parentPath, List<String> currentChildren) throws Exception
IZkChildListenerNOTICE: if subscribing a node(not exists), the event will be triggered while the node(parent) were created.
handleChildChange 在接口中 IZkChildListenerparentPath - The parent pathcurrentChildren - The children or null if the root node (parent path) was deleted.Exception - any exceptionCopyright © 2019. All rights reserved.