public static enum KafkaStreams.State extends java.lang.Enum<KafkaStreams.State>
+--------------+ +<----- | Created | | +-----+--------+ | | | v | +-----+--------+ <-+ +<----- | Rebalancing | --+ | +--------------+ <----+ | | | | | +--------------+ | +-----> | Running | ---->+ | +-----+--------+ | | | v | +-----+--------+ +-----> | Pending |<----+ | | Shutdown | | | +-----+--------+ | | | | | v | | +-----+--------+ | | | Not Running | | | +--------------+ | | | | +--------------+ | +-----> | Error |-----+ +--------------+Note the following: - Any state can go to PENDING_SHUTDOWN and subsequently NOT_RUNNING. - It is theoretically possible for a thread to always be in the PARTITION_REVOKED state (see
StreamThread
state diagram) and hence it is possible that this instance is always
on a REBALANCING state.
- Of special importance: If the global stream thread dies, or all stream threads die (or both) then
the instance will be in the ERROR state. The user will need to close it.Enum Constant and Description |
---|
CREATED |
ERROR |
NOT_RUNNING |
PENDING_SHUTDOWN |
REBALANCING |
RUNNING |
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning() |
boolean |
isValidTransition(KafkaStreams.State newState) |
static KafkaStreams.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static KafkaStreams.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KafkaStreams.State CREATED
public static final KafkaStreams.State REBALANCING
public static final KafkaStreams.State RUNNING
public static final KafkaStreams.State PENDING_SHUTDOWN
public static final KafkaStreams.State NOT_RUNNING
public static final KafkaStreams.State ERROR
public static KafkaStreams.State[] values()
for (KafkaStreams.State c : KafkaStreams.State.values()) System.out.println(c);
public static KafkaStreams.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(KafkaStreams.State newState)