Modifier and Type | Method and Description |
---|---|
NodeReader |
LeaderElection.createReader()
Create a
NodeReader instance to read the content
of the znode that is used for leader election. |
NodeReader |
NodeReader.finish()
Mark as 'shouldFinish' not to schedule ZooKeeper callbacks
any further.
|
NodeReader |
NodeReader.setListener(NodeReader.Listener listener)
Set a listener.
|
NodeReader |
NodeReader.setPath(String path)
Set the path of the target znode to read.
|
NodeReader |
NodeReader.setZooKeeper(org.apache.zookeeper.ZooKeeper zooKeeper)
Set the
ZooKeeper instance to read the target znode. |
NodeReader |
NodeReader.start()
Start reading the target znode.
|
Modifier and Type | Method and Description |
---|---|
void |
NodeReader.Listener.onGaveUp(NodeReader reader)
Called when the
NodeReader gave up reading
the target znode. |
void |
NodeReader.Adapter.onGaveUp(NodeReader reader) |
void |
NodeReader.Listener.onRead(NodeReader reader,
byte[] data,
org.apache.zookeeper.data.Stat stat)
Called when the content of the target znode was read
successfully.
|
void |
NodeReader.Adapter.onRead(NodeReader reader,
byte[] data,
org.apache.zookeeper.data.Stat stat) |
Copyright © 2015. All rights reserved.