Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration ConnectionState

Represents state changes in the connection to ZK

Index

Enumeration members

CONNECTED

CONNECTED:

Sent for the first successful connection to the server. NOTE: You will only get one of these messages for any CuratorFramework instance.

LOST

LOST:

Curator will set the LOST state when it believes that the ZooKeeper session has expired. ZooKeeper connections have a session. When the session expires, clients must take appropriate action. In Curator, this is complicated by the fact that Curator internally manages the ZooKeeper connection. Curator will set the LOST state when any of the following occurs: a) ZooKeeper returns a {@link Watcher.Event.KeeperState#Expired} or {@link KeeperException.Code#SESSIONEXPIRED}; b) Curator closes the internally managed ZooKeeper instance; c) The session timeout elapses during a network partition.

NOTE: see {@link CuratorFrameworkFactory.Builder#connectionHandlingPolicy(ConnectionHandlingPolicy)} for an important note about a change in meaning to LOST since 3.0.0

READ_ONLY

READ_ONLY:

The connection has gone into read-only mode. This can only happen if you pass true for {@link CuratorFrameworkFactory.Builder#canBeReadOnly()}. See the ZooKeeper doc regarding read only connections: http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode. The connection will remain in read only mode until another state change is sent.

RECONNECTED

RECONNECTED:

A suspended, lost, or read-only connection has been re-established

SUSPENDED

SUSPENDED:

There has been a loss of connection. Leaders, locks, etc. should suspend until the connection is re-established.

We don't have access to this event with the current ZooKeeper client...

Generated using TypeDoc