|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Errors> org.apache.kafka.common.protocol.Errors
public enum Errors
This class contains all the client-server errors--those errors that must be sent from the server to the client. These are thus part of the protocol. The names can be changed but the error code cannot. Do not add exceptions that occur only on the client or only on the server here.
Method Summary | |
---|---|
short |
code()
The error code for the exception |
ApiException |
exception()
An instance of the exception |
static Errors |
forCode(short code)
Throw the exception if there is one |
static Errors |
forException(java.lang.Throwable t)
Return the error instance associated with this exception (or UKNOWN if there is none) |
void |
maybeThrow()
Throw the exception corresponding to this error if there is one |
static Errors |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Errors[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Errors UNKNOWN
public static final Errors NONE
public static final Errors OFFSET_OUT_OF_RANGE
public static final Errors CORRUPT_MESSAGE
public static final Errors UNKNOWN_TOPIC_OR_PARTITION
public static final Errors LEADER_NOT_AVAILABLE
public static final Errors NOT_LEADER_FOR_PARTITION
public static final Errors REQUEST_TIMED_OUT
public static final Errors MESSAGE_TOO_LARGE
public static final Errors OFFSET_METADATA_TOO_LARGE
public static final Errors NETWORK_EXCEPTION
public static final Errors INVALID_TOPIC_EXCEPTION
public static final Errors RECORD_LIST_TOO_LARGE
public static final Errors NOT_ENOUGH_REPLICAS
public static final Errors NOT_ENOUGH_REPLICAS_AFTER_APPEND
Method Detail |
---|
public static Errors[] values()
for (Errors c : Errors.values()) System.out.println(c);
public static Errors 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 name
java.lang.NullPointerException
- if the argument is nullpublic ApiException exception()
public short code()
public void maybeThrow()
public static Errors forCode(short code)
public static Errors forException(java.lang.Throwable t)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |