Enum PartitionStrategy
- java.lang.Object
-
- java.lang.Enum<PartitionStrategy>
-
- org.apache.flink.cdc.connectors.kafka.sink.PartitionStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<PartitionStrategy>
public enum PartitionStrategy extends Enum<PartitionStrategy>
Partition Strategy for sendingProducerRecordto kafka partition.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL_TO_ZEROAllProducerRecordwill be sent to partition 0.HASH_BY_KEYProducerRecordwill be sent to specific partition by primary key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()static PartitionStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static PartitionStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL_TO_ZERO
public static final PartitionStrategy ALL_TO_ZERO
AllProducerRecordwill be sent to partition 0.
-
HASH_BY_KEY
public static final PartitionStrategy HASH_BY_KEY
ProducerRecordwill be sent to specific partition by primary key.
-
-
Method Detail
-
values
public static PartitionStrategy[] 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 (PartitionStrategy c : PartitionStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PartitionStrategy 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
-
toString
public String toString()
- Overrides:
toStringin classEnum<PartitionStrategy>
-
-