Load the zookeeper node data as well as leaving a data watch, then invoke the applyZKData implementation to process the data string.
Load the zookeeper node children as well as leaving a children watch, then invoke the applyZKChildren implementation to process the children list.
Reconnect to the zookeeper, this maybe invoked when zookeeper connection expired and the node data watcher previously registered got dropped, hence re-attache the data wather here.
A zk monitor trait that assists with monitoring a given zk path for any node data change, in which the provided zk data handling implementation will be invoked.
This monitor will maintain a queue so that every work item triggered by zk event will be processed in an order with a back off policy. It also set-up a zookeeper connection watcher by default to re-set the data change watcher even during zk re-connect.
The monitor will set-up all watcher properly kick off the loop to process future event; you can also invoke loadZKData() in your class anytime to force reading zk data and apply it.
Example use cases are: - zookeeper based CachePoolCluster uses this to monitor cache pool members change - zookeeper based MigrationClient uses this ot monitor migration state transitioning