Package org.apache.zookeeper
Enum KeeperException.Code
- java.lang.Object
-
- java.lang.Enum<KeeperException.Code>
-
- org.apache.zookeeper.KeeperException.Code
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<KeeperException.Code>
,KeeperException.CodeDeprecated
- Enclosing class:
- KeeperException
@Public public static enum KeeperException.Code extends java.lang.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.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APIERROR
API errors.AUTHFAILED
Client authentication failedBADARGUMENTS
Invalid argumentsBADVERSION
Version conflictCONNECTIONLOSS
Connection to the server has been lostDATAINCONSISTENCY
A data inconsistency was foundINVALIDACL
Invalid ACL specifiedINVALIDCALLBACK
Invalid callback specifiedMARSHALLINGERROR
Error while marshalling or unmarshalling dataNOAUTH
Not authenticatedNOCHILDRENFOREPHEMERALS
Ephemeral nodes may not have childrenNODEEXISTS
The node already existsNONODE
Node does not existNOTEMPTY
The node has childrenNOTREADONLY
State-changing request is passed to read-only serverOK
Everything is OKOPERATIONTIMEOUT
Operation timeoutRUNTIMEINCONSISTENCY
A runtime inconsistency was foundSESSIONEXPIRED
The session has been expired by the serverSESSIONMOVED
Session moved to another server, so operation is ignoredSYSTEMERROR
System and server-side errors.UNIMPLEMENTED
Operation is unimplemented
-
Field Summary
-
Fields inherited from interface org.apache.zookeeper.KeeperException.CodeDeprecated
APIError, AuthFailed, BadArguments, BadVersion, ConnectionLoss, DataInconsistency, InvalidACL, InvalidCallback, MarshallingError, NoAuth, NoChildrenForEphemerals, NodeExists, NoNode, NotEmpty, Ok, OperationTimeout, RuntimeInconsistency, SessionExpired, SystemError, Unimplemented
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static KeeperException.Code[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OK
public static final KeeperException.Code OK
Everything is OK
-
SYSTEMERROR
public static final KeeperException.Code 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
public static final KeeperException.Code RUNTIMEINCONSISTENCY
A runtime inconsistency was found
-
DATAINCONSISTENCY
public static final KeeperException.Code DATAINCONSISTENCY
A data inconsistency was found
-
CONNECTIONLOSS
public static final KeeperException.Code CONNECTIONLOSS
Connection to the server has been lost
-
MARSHALLINGERROR
public static final KeeperException.Code MARSHALLINGERROR
Error while marshalling or unmarshalling data
-
UNIMPLEMENTED
public static final KeeperException.Code UNIMPLEMENTED
Operation is unimplemented
-
OPERATIONTIMEOUT
public static final KeeperException.Code OPERATIONTIMEOUT
Operation timeout
-
BADARGUMENTS
public static final KeeperException.Code BADARGUMENTS
Invalid arguments
-
APIERROR
public static final KeeperException.Code 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
public static final KeeperException.Code NONODE
Node does not exist
-
NOAUTH
public static final KeeperException.Code NOAUTH
Not authenticated
-
BADVERSION
public static final KeeperException.Code BADVERSION
Version conflict
-
NOCHILDRENFOREPHEMERALS
public static final KeeperException.Code NOCHILDRENFOREPHEMERALS
Ephemeral nodes may not have children
-
NODEEXISTS
public static final KeeperException.Code NODEEXISTS
The node already exists
-
NOTEMPTY
public static final KeeperException.Code NOTEMPTY
The node has children
-
SESSIONEXPIRED
public static final KeeperException.Code SESSIONEXPIRED
The session has been expired by the server
-
INVALIDCALLBACK
public static final KeeperException.Code INVALIDCALLBACK
Invalid callback specified
-
INVALIDACL
public static final KeeperException.Code INVALIDACL
Invalid ACL specified
-
AUTHFAILED
public static final KeeperException.Code AUTHFAILED
Client authentication failed
-
SESSIONMOVED
public static final KeeperException.Code SESSIONMOVED
Session moved to another server, so operation is ignored
-
NOTREADONLY
public static final KeeperException.Code NOTREADONLY
State-changing request is passed to read-only server
-
-
Method Detail
-
values
public static KeeperException.Code[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeeperException.Code c : KeeperException.Code.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeeperException.Code valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
intValue
public int intValue()
Get the int value for a particular Code.- Returns:
- error code as integer
-
get
public static KeeperException.Code get(int code)
Get the Code value for a particular integer error code- Parameters:
code
- int error code- Returns:
- Code value corresponding to specified int code, or null
-
-