You can always check the current connection state via:

client.getZookeeperClient().isConnected()


On September 2, 2014 at 1:49:26 PM, Vitalii Tymchyshyn ([email protected]) wrote:

Hello.

I am trying to find is client is connected at given point of time.

The only option I can see is to call blockUntilConnected(1, NANOSECONDS) and 
check result.

What I found is that javadoc is different from the implementation.
According to javadoc blockUntilConnected(0, *) will wait indefinite, but 
according to implementation blockUntilConnected(0, NANOSECONDS) will not wait 
at all, instead blockUntilConnected(*, null) will wait.

Best regards, Vitalii Tymchyshyn

Reply via email to