Package org.apache.flink.types
Enum RowKind
- java.lang.Object
-
- java.lang.Enum<RowKind>
-
- org.apache.flink.types.RowKind
-
- All Implemented Interfaces:
Serializable
,Comparable<RowKind>
@PublicEvolving public enum RowKind extends Enum<RowKind>
Lists all kinds of changes that a row can describe in a changelog.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DELETE
Deletion operation.INSERT
Insertion operation.UPDATE_AFTER
Update operation with new content of the updated row.UPDATE_BEFORE
Update operation with the previous content of the updated row.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RowKind
fromByteValue(byte value)
Creates aRowKind
from the given byte value.String
shortString()
Returns a short string representation of thisRowKind
.byte
toByteValue()
Returns the byte value representation of thisRowKind
.static RowKind
valueOf(String name)
Returns the enum constant of this type with the specified name.static RowKind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSERT
public static final RowKind INSERT
Insertion operation.
-
UPDATE_BEFORE
public static final RowKind UPDATE_BEFORE
Update operation with the previous content of the updated row.This kind SHOULD occur together with
UPDATE_AFTER
for modelling an update that needs to retract the previous row first. It is useful in cases of a non-idempotent update, i.e., an update of a row that is not uniquely identifiable by a key.
-
UPDATE_AFTER
public static final RowKind UPDATE_AFTER
Update operation with new content of the updated row.This kind CAN occur together with
UPDATE_BEFORE
for modelling an update that needs to retract the previous row first. OR it describes an idempotent update, i.e., an update of a row that is uniquely identifiable by a key.
-
DELETE
public static final RowKind DELETE
Deletion operation.
-
-
Method Detail
-
values
public static RowKind[] 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 (RowKind c : RowKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RowKind 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
-
shortString
public String shortString()
Returns a short string representation of thisRowKind
.- "+I" represents
INSERT
. - "-U" represents
UPDATE_BEFORE
. - "+U" represents
UPDATE_AFTER
. - "-D" represents
DELETE
.
- "+I" represents
-
toByteValue
public byte toByteValue()
Returns the byte value representation of thisRowKind
. The byte value is used for serialization and deserialization.- "0" represents
INSERT
. - "1" represents
UPDATE_BEFORE
. - "2" represents
UPDATE_AFTER
. - "3" represents
DELETE
.
- "0" represents
-
fromByteValue
public static RowKind fromByteValue(byte value)
- See Also:
for mapping of byte value and .
-
-