Enum StartupMode
- java.lang.Object
-
- java.lang.Enum<StartupMode>
-
- org.apache.flink.streaming.connectors.kafka.config.StartupMode
-
- All Implemented Interfaces:
Serializable,Comparable<StartupMode>
@Internal public enum StartupMode extends Enum<StartupMode>
Startup modes for the Kafka Consumer.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EARLIESTStart from the earliest offset possible.GROUP_OFFSETSStart from committed offsets in ZK / Kafka brokers of a specific consumer group (default).LATESTStart from the latest offset.SPECIFIC_OFFSETSStart from user-supplied specific offsets for each partition.TIMESTAMPStart from user-supplied timestamp for each partition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetStateSentinel()static StartupModevalueOf(String name)Returns the enum constant of this type with the specified name.static StartupMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GROUP_OFFSETS
public static final StartupMode GROUP_OFFSETS
Start from committed offsets in ZK / Kafka brokers of a specific consumer group (default).
-
EARLIEST
public static final StartupMode EARLIEST
Start from the earliest offset possible.
-
LATEST
public static final StartupMode LATEST
Start from the latest offset.
-
TIMESTAMP
public static final StartupMode 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
public static final StartupMode 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 Detail
-
values
public static StartupMode[] 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 (StartupMode c : StartupMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StartupMode 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
-
getStateSentinel
public long getStateSentinel()
-
-