|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<ConnectionState>
org.apache.curator.framework.state.ConnectionState
public enum ConnectionState
Represents state changes in the connection to ZK
| Enum Constant Summary | |
|---|---|
CONNECTED
Sent for the first successful connection to the server. |
|
LOST
The connection is confirmed to be lost. |
|
READ_ONLY
The connection has gone into read-only mode. |
|
RECONNECTED
A suspended or read-only connection has been re-established |
|
SUSPENDED
There has been a loss of connection. |
|
| Method Summary | |
|---|---|
abstract boolean |
isConnected()
Check if this state indicates that Curator has a connection to ZooKeeper |
static ConnectionState |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ConnectionState[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final ConnectionState CONNECTED
public static final ConnectionState SUSPENDED
LOST notice
public static final ConnectionState RECONNECTED
public static final ConnectionState LOST
RECONNECTED
state after this but you should still consider any locks, etc. as dirty/unstable
public static final ConnectionState READ_ONLY
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.
| Method Detail |
|---|
public static ConnectionState[] values()
for (ConnectionState c : ConnectionState.values()) System.out.println(c);
public static ConnectionState valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic abstract boolean isConnected()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||