public static class NodeReader.Adapter extends Object implements NodeReader.Listener
NodeReader.Listener interface.| Constructor and Description |
|---|
Adapter() |
| 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.
|
public void onRead(NodeReader reader, byte[] data, org.apache.zookeeper.data.Stat stat)
NodeReader.ListeneronRead in interface NodeReader.Listenerreader - The NodeReader instance which this
listener is associated with.data - The content of the target znode.stat - Statistics of the target znode.public void onGaveUp(NodeReader reader)
NodeReader.ListenerNodeReader 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().
onGaveUp in interface NodeReader.Listenerreader - The NodeReader instance which this
listener is associated with.Copyright © 2015. All rights reserved.