Package org.gearman.common
Enum GearmanPacketType
- java.lang.Object
-
- java.lang.Enum<GearmanPacketType>
-
- org.gearman.common.GearmanPacketType
-
- All Implemented Interfaces:
Serializable
,Comparable<GearmanPacketType>
public enum GearmanPacketType extends Enum<GearmanPacketType>
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GearmanPacketType
get(int ordinal)
Returns the PacketType for the specifiedordinal
.static boolean
isJobSubmission(GearmanPacketType pt)
byte[]
toBytes()
static GearmanPacketType
valueOf(String name)
Returns the enum constant of this type with the specified name.static GearmanPacketType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NULL
public static final GearmanPacketType NULL
-
CAN_DO
public static final GearmanPacketType CAN_DO
-
CANT_DO
public static final GearmanPacketType CANT_DO
-
RESET_ABILITIES
public static final GearmanPacketType RESET_ABILITIES
-
PRE_SLEEP
public static final GearmanPacketType PRE_SLEEP
-
unused_5
public static final GearmanPacketType unused_5
-
NOOP
public static final GearmanPacketType NOOP
-
SUBMIT_JOB
public static final GearmanPacketType SUBMIT_JOB
-
JOB_CREATED
public static final GearmanPacketType JOB_CREATED
-
GRAB_JOB
public static final GearmanPacketType GRAB_JOB
-
NO_JOB
public static final GearmanPacketType NO_JOB
-
JOB_ASSIGN
public static final GearmanPacketType JOB_ASSIGN
-
WORK_STATUS
public static final GearmanPacketType WORK_STATUS
-
WORK_COMPLETE
public static final GearmanPacketType WORK_COMPLETE
-
WORK_FAIL
public static final GearmanPacketType WORK_FAIL
-
GET_STATUS
public static final GearmanPacketType GET_STATUS
-
ECHO_REQ
public static final GearmanPacketType ECHO_REQ
-
ECHO_RES
public static final GearmanPacketType ECHO_RES
-
SUBMIT_JOB_BG
public static final GearmanPacketType SUBMIT_JOB_BG
-
ERROR
public static final GearmanPacketType ERROR
-
STATUS_RES
public static final GearmanPacketType STATUS_RES
-
SUBMIT_JOB_HIGH
public static final GearmanPacketType SUBMIT_JOB_HIGH
-
SET_CLIENT_ID
public static final GearmanPacketType SET_CLIENT_ID
-
CAN_DO_TIMEOUT
public static final GearmanPacketType CAN_DO_TIMEOUT
-
ALL_YOURS
public static final GearmanPacketType ALL_YOURS
-
WORK_EXCEPTION
public static final GearmanPacketType WORK_EXCEPTION
-
OPTION_REQ
public static final GearmanPacketType OPTION_REQ
-
OPTION_RES
public static final GearmanPacketType OPTION_RES
-
WORK_DATA
public static final GearmanPacketType WORK_DATA
-
WORK_WARNING
public static final GearmanPacketType WORK_WARNING
-
GRAB_JOB_UNIQ
public static final GearmanPacketType GRAB_JOB_UNIQ
-
JOB_ASSIGN_UNIQ
public static final GearmanPacketType JOB_ASSIGN_UNIQ
-
SUBMIT_JOB_HIGH_BG
public static final GearmanPacketType SUBMIT_JOB_HIGH_BG
-
SUBMIT_JOB_LOW
public static final GearmanPacketType SUBMIT_JOB_LOW
-
SUBMIT_JOB_LOW_BG
public static final GearmanPacketType SUBMIT_JOB_LOW_BG
-
SUBMIT_JOB_SCHED
public static final GearmanPacketType SUBMIT_JOB_SCHED
-
SUBMIT_JOB_EPOCH
public static final GearmanPacketType SUBMIT_JOB_EPOCH
-
-
Method Detail
-
values
public static GearmanPacketType[] 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 (GearmanPacketType c : GearmanPacketType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GearmanPacketType valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toBytes
public byte[] toBytes()
-
isJobSubmission
public static boolean isJobSubmission(GearmanPacketType pt)
-
get
public static GearmanPacketType get(int ordinal)
Returns the PacketType for the specifiedordinal
.- Parameters:
ordinal
- a PacketType ordinal- Returns:
- the PacketType for the specified
ordinal
- Throws:
IllegalArgumentException
- if an invalid ordinal is provided
-
-