public static enum StreamThread.State extends java.lang.Enum<StreamThread.State> implements ThreadStateTransitionValidator
+-------------+ +<--- | Created (0) | | +-----+-------+ | | | v | +-----+-------+ +<--- | Running (1) | <----+ | +-----+-------+ | | | | | v | | +-----+-------+ | +<--- | Partitions | | | | Revoked (2) | <----+ | +-----+-------+ | | | | | v | | +-----+-------+ | | | Partitions | | | | Assigned (3)| ---->+ | +-----+-------+ | | | v | +-----+-------+ +---> | Pending | | Shutdown (4)| +-----+-------+ | v +-----+-------+ | Dead (5) | +-------------+Note the following:
Enum Constant and Description |
---|
CREATED |
DEAD |
PARTITIONS_ASSIGNED |
PARTITIONS_REVOKED |
PENDING_SHUTDOWN |
RUNNING |
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning() |
boolean |
isValidTransition(ThreadStateTransitionValidator newState) |
static StreamThread.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StreamThread.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StreamThread.State CREATED
public static final StreamThread.State RUNNING
public static final StreamThread.State PARTITIONS_REVOKED
public static final StreamThread.State PARTITIONS_ASSIGNED
public static final StreamThread.State PENDING_SHUTDOWN
public static final StreamThread.State DEAD
public static StreamThread.State[] values()
for (StreamThread.State c : StreamThread.State.values()) System.out.println(c);
public static StreamThread.State 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 namejava.lang.NullPointerException
- if the argument is nullpublic boolean isRunning()
public boolean isValidTransition(ThreadStateTransitionValidator newState)
isValidTransition
in interface ThreadStateTransitionValidator