Enum Class StartupMode
- All Implemented Interfaces:
Serializable,Comparable<StartupMode>,java.lang.constant.Constable
Startup modes for the Kafka Consumer.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStart from the earliest offset possible.Start from committed offsets in ZK / Kafka brokers of a specific consumer group (default).Start from the latest offset.Start from user-supplied specific offsets for each partition.Start from user-supplied timestamp for each partition. -
Method Summary
Modifier and TypeMethodDescriptionlongstatic StartupModeReturns the enum constant of this class with the specified name.static StartupMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GROUP_OFFSETS
Start from committed offsets in ZK / Kafka brokers of a specific consumer group (default). -
EARLIEST
Start from the earliest offset possible. -
LATEST
Start from the latest offset. -
TIMESTAMP
Start from user-supplied timestamp for each partition. Since this mode will have specific offsets to start with, we do not need a sentinel value; using Long.MIN_VALUE as a placeholder. -
SPECIFIC_OFFSETS
Start from user-supplied specific offsets for each partition. Since this mode will have specific offsets to start with, we do not need a sentinel value; using Long.MIN_VALUE as a placeholder.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getStateSentinel
public long getStateSentinel()
-