public static interface NodeReader.Listener
| Modifier and Type | Method and Description |
|---|---|
void |
onGaveUp(NodeReader reader)
Called when the
NodeReader gave up reading
the target znode. |
void |
onRead(NodeReader reader,
byte[] data,
org.apache.zookeeper.data.Stat stat)
Called when the content of the target znode was read
successfully.
|
void onRead(NodeReader reader, byte[] data, org.apache.zookeeper.data.Stat stat)
reader - The NodeReader instance which this
listener is associated with.data - The content of the target znode.stat - Statistics of the target znode.void onGaveUp(NodeReader reader)
NodeReader gave up reading
the target znode.
This callback is called when it detects one of the following
when it tried to call a ZooKeeper's method
(getData()
or exists().
Note that this method may not be called so soon and may not
be called at all.
- The given
ZooKeeperinstance reportsAUTH_FAILEDorCLOSED.- This instance is marked as 'shouldFinish' by
NodeReader.finish().
reader - The NodeReader instance which this
listener is associated with.Copyright © 2015. All rights reserved.