Package org.apache.bookkeeper.metastore
Enum MSException.Code
- java.lang.Object
-
- java.lang.Enum<MSException.Code>
-
- org.apache.bookkeeper.metastore.MSException.Code
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MSException.Code>
- Enclosing class:
- MSException
public static enum MSException.Code extends java.lang.Enum<MSException.Code>
Return codes.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BadVersion
IllegalOp
InterruptedException
KeyExists
NoEntries
NoKey
OK
OperationFailure
ServiceDown
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MSException.Code
get(int code)
Get the Code value for a particular integer error code.int
getCode()
Get the int value for a particular Code.java.lang.String
getDescription()
Get the description for a particular Code.static MSException.Code
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MSException.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 MSException.Code OK
-
BadVersion
public static final MSException.Code BadVersion
-
NoKey
public static final MSException.Code NoKey
-
KeyExists
public static final MSException.Code KeyExists
-
NoEntries
public static final MSException.Code NoEntries
-
InterruptedException
public static final MSException.Code InterruptedException
-
IllegalOp
public static final MSException.Code IllegalOp
-
ServiceDown
public static final MSException.Code ServiceDown
-
OperationFailure
public static final MSException.Code OperationFailure
-
-
Method Detail
-
values
public static MSException.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 (MSException.Code c : MSException.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 MSException.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
-
getCode
public int getCode()
Get the int value for a particular Code.- Returns:
- error code as integer
-
getDescription
public java.lang.String getDescription()
Get the description for a particular Code.- Returns:
- error description
-
get
public static MSException.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.
-
-