java.io.Serializable, java.lang.Comparable<ZooKeeper.States>@Public public static enum ZooKeeper.States extends java.lang.Enum<ZooKeeper.States>
| Enum Constant | Description |
|---|---|
ASSOCIATING |
|
AUTH_FAILED |
|
CLOSED |
|
CONNECTED |
|
CONNECTEDREADONLY |
|
CONNECTING |
|
NOT_CONNECTED |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
isAlive() |
|
boolean |
isConnected() |
Returns whether we are connected to a server (which
could possibly be read-only, if this client is allowed
to go to read-only mode)
|
static ZooKeeper.States |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static ZooKeeper.States[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ZooKeeper.States CONNECTING
public static final ZooKeeper.States ASSOCIATING
public static final ZooKeeper.States CONNECTED
public static final ZooKeeper.States CONNECTEDREADONLY
public static final ZooKeeper.States CLOSED
public static final ZooKeeper.States AUTH_FAILED
public static final ZooKeeper.States NOT_CONNECTED
public static ZooKeeper.States[] values()
for (ZooKeeper.States c : ZooKeeper.States.values()) System.out.println(c);
public static ZooKeeper.States valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean isAlive()
public boolean isConnected()
Copyright © 2018 The Apache Software Foundation