Enum OffsetCommitMode
- java.lang.Object
-
- java.lang.Enum<OffsetCommitMode>
-
- org.apache.flink.streaming.connectors.kafka.config.OffsetCommitMode
-
- All Implemented Interfaces:
Serializable,Comparable<OffsetCommitMode>
@Internal public enum OffsetCommitMode extends Enum<OffsetCommitMode>
The offset commit mode represents the behaviour of how offsets are externally committed back to Kafka brokers / Zookeeper.The exact value of this is determined at runtime in the consumer subtasks.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISABLEDCompletely disable offset committing.KAFKA_PERIODICCommit offsets periodically back to Kafka, using the auto commit functionality of internal Kafka clients.ON_CHECKPOINTSCommit offsets back to Kafka only when checkpoints are completed.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OffsetCommitModevalueOf(String name)Returns the enum constant of this type with the specified name.static OffsetCommitMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DISABLED
public static final OffsetCommitMode DISABLED
Completely disable offset committing.
-
ON_CHECKPOINTS
public static final OffsetCommitMode ON_CHECKPOINTS
Commit offsets back to Kafka only when checkpoints are completed.
-
KAFKA_PERIODIC
public static final OffsetCommitMode KAFKA_PERIODIC
Commit offsets periodically back to Kafka, using the auto commit functionality of internal Kafka clients.
-
-
Method Detail
-
values
public static OffsetCommitMode[] 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 (OffsetCommitMode c : OffsetCommitMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OffsetCommitMode 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
-
-