public static enum ZooKeeper.States extends Enum<ZooKeeper.States>
Enum Constant and Description |
---|
ASSOCIATING |
AUTH_FAILED |
CLOSED |
CONNECTED |
CONNECTEDREADONLY |
CONNECTING |
NOT_CONNECTED |
Modifier and Type | Method and 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(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(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isAlive()
public boolean isConnected()
Copyright © 2017 The Apache Software Foundation