Package org.apache.zookeeper
Enum Class KeeperException.Code
- All Implemented Interfaces:
Serializable
,Comparable<KeeperException.Code>
,Constable
,KeeperException.CodeDeprecated
- Enclosing class:
- KeeperException
@Public
public static enum KeeperException.Code
extends Enum<KeeperException.Code>
implements KeeperException.CodeDeprecated
Codes which represent the various KeeperException
types. This enum replaces the deprecated earlier static final int
constants. The old, deprecated, values are in "camel case" while the new
enum values are in all CAPS.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAPI errors.Client authentication failedInvalid argumentsVersion conflict In case of reconfiguration: reconfig requested from config version X but last seen config has a different version YConnection to the server has been lostA data inconsistency was foundAttempt to create ephemeral node on a local sessionInvalid ACL specifiedInvalid callback specifiedError while marshalling or unmarshalling dataNo quorum of new config is connected and up-to-date with the leader of last committed config - try invoking reconfiguration after new servers are connected and syncedNot authenticatedEphemeral nodes may not have childrenThe node already existsNode does not existThe node has childrenState-changing request is passed to read-only serverAttempts to remove a non-existing watcherEverything is OKOperation timeoutExceeded the quota that was set on the path.Attempts to perform a reconfiguration operation when reconfiguration feature is disabled.Another reconfiguration is in progress -- concurrent reconfigs not supported (yet)Request not completed within max allowed time.A runtime inconsistency was foundThe session has been closed by server because server requires client to do authentication with configured authentication scheme at the server, but client is not configured with required authentication scheme or configured but authentication failed (i.e.The session has been expired by the serverSession moved to another server, so operation is ignoredSystem and server-side errors.Operation was throttled and not executed at all.Operation is unimplementedUnknown session (internal server use only) -
Field Summary
Fields inherited from interface org.apache.zookeeper.KeeperException.CodeDeprecated
APIError, AuthFailed, BadArguments, BadVersion, ConnectionLoss, DataInconsistency, EphemeralOnLocalSession, InvalidACL, InvalidCallback, MarshallingError, NewConfigNoQuorum, NoAuth, NoChildrenForEphemerals, NodeExists, NoNode, NotEmpty, Ok, OperationTimeout, ReconfigInProgress, RuntimeInconsistency, SessionExpired, SystemError, Unimplemented, UnknownSession
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeeperException.Code
get
(int code) Get the Code value for a particular integer error codeint
intValue()
Get the int value for a particular Code.static KeeperException.Code
Returns the enum constant of this class with the specified name.static KeeperException.Code[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OK
Everything is OK -
SYSTEMERROR
System and server-side errors. This is never thrown by the server, it shouldn't be used other than to indicate a range. Specifically error codes greater than this value, but lesser thanAPIERROR
, are system errors. -
RUNTIMEINCONSISTENCY
A runtime inconsistency was found -
DATAINCONSISTENCY
A data inconsistency was found -
CONNECTIONLOSS
Connection to the server has been lost -
MARSHALLINGERROR
Error while marshalling or unmarshalling data -
UNIMPLEMENTED
Operation is unimplemented -
OPERATIONTIMEOUT
Operation timeout -
BADARGUMENTS
Invalid arguments -
NEWCONFIGNOQUORUM
No quorum of new config is connected and up-to-date with the leader of last committed config - try invoking reconfiguration after new servers are connected and synced -
RECONFIGINPROGRESS
Another reconfiguration is in progress -- concurrent reconfigs not supported (yet) -
UNKNOWNSESSION
Unknown session (internal server use only) -
APIERROR
API errors. This is never thrown by the server, it shouldn't be used other than to indicate a range. Specifically error codes greater than this value are API errors (while values less than this indicate aSYSTEMERROR
). -
NONODE
Node does not exist -
NOAUTH
Not authenticated -
BADVERSION
Version conflict In case of reconfiguration: reconfig requested from config version X but last seen config has a different version Y -
NOCHILDRENFOREPHEMERALS
Ephemeral nodes may not have children -
NODEEXISTS
The node already exists -
NOTEMPTY
The node has children -
SESSIONEXPIRED
The session has been expired by the server -
INVALIDCALLBACK
Invalid callback specified -
INVALIDACL
Invalid ACL specified -
AUTHFAILED
Client authentication failed -
SESSIONMOVED
Session moved to another server, so operation is ignored -
NOTREADONLY
State-changing request is passed to read-only server -
EPHEMERALONLOCALSESSION
Attempt to create ephemeral node on a local session -
NOWATCHER
Attempts to remove a non-existing watcher -
REQUESTTIMEOUT
Request not completed within max allowed time. -
RECONFIGDISABLED
Attempts to perform a reconfiguration operation when reconfiguration feature is disabled. -
SESSIONCLOSEDREQUIRESASLAUTH
The session has been closed by server because server requires client to do authentication with configured authentication scheme at the server, but client is not configured with required authentication scheme or configured but authentication failed (i.e. wrong credential used.). -
QUOTAEXCEEDED
Exceeded the quota that was set on the path. -
THROTTLEDOP
Operation was throttled and not executed at all. This error code indicates that zookeeper server is under heavy load and can't process incoming requests at full speed; please retry with back off.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
intValue
public int intValue()Get the int value for a particular Code.- Returns:
- error code as integer
-
get
Get the Code value for a particular integer error code- Parameters:
code
- int error code- Returns:
- Code value corresponding to specified int code, if null throws IllegalArgumentException
-