> lets say i configure session time out of 30000 and node A is the leader
> i then disconnect A's network when will noLeader method be called?

It depends which version of Curator you're using. For Curator 2.x, it will 
occur when ZooKeeper disconnects from the server which happens when a heartbeat 
is missed. A ZK heartbeat is 2/3 of a session so it would happen at approx 
20000 in Curator 2.x. For Curator 3.x, it is configurable when it happens - the 
default is to set a timer when the connection is lost and simulate a session 
loss after the session times-out. So, for Curator 3.x it would happen at approx 
30000. The new behavior is describe for the LOST state here: 
http://curator.apache.org/errors.html <http://curator.apache.org/errors.html>

> when do nodes B 
> and C be notified about that?  


That's normal ZK operations. As you can imagine it happens when the Ephemeral 
nodes are deleted by the server which happens when the session times out. If 
you need more information on how ZooKeeper deals with sessions I suggest you 
ask on the ZooKeeper lists.

-Jordan

Reply via email to