session - What is the different between isAlive() and isConnected() in Zookeeper$Status ? (3.4.5) -
here source code, , made me confuse status "closed" , "not_connected".(zookeeper version r3.4.5)
public enum states { connecting, associating, connected, connectedreadonly, closed, auth_failed, not_connected; public boolean isalive() { return != closed && != auth_failed; } /** * returns whether connected server (which * possibly read-only, if client allowed * go read-only mode) * */ public boolean isconnected() { return == connected || == connectedreadonly; } }
and if session go expired(watcher catch expired event), means isalive() return false?
the zookeeper sessions states zookeeper programmer's guide
and if session go expired(watcher catch expired event), means isalive() return false?
so if session go expired, isalive() returns false.
Comments
Post a Comment