Package io.imast.work4j.model.cluster
Enum WorkerKind
- java.lang.Object
-
- java.lang.Enum<WorkerKind>
-
- io.imast.work4j.model.cluster.WorkerKind
-
- All Implemented Interfaces:
Serializable,Comparable<WorkerKind>
public enum WorkerKind extends Enum<WorkerKind> implements Serializable
The worker kind within cluster- Author:
- davitp
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WorkerKindvalueOf(String name)Returns the enum constant of this type with the specified name.static WorkerKind[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXCLUSIVE
public static final WorkerKind EXCLUSIVE
The exclusive worker (only one) for this cluster
-
REPLICA
public static final WorkerKind REPLICA
The standalone replica worker kind
-
BALANCED
public static final WorkerKind BALANCED
The balanced worker kind to share load within cluster
-
-
Method Detail
-
values
public static WorkerKind[] 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 (WorkerKind c : WorkerKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WorkerKind 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
-
-