Package com.hazelcast.jet.cdc
Enum Operation
- All Implemented Interfaces:
Serializable
,Comparable<Operation>
,java.lang.constant.Constable
@EvolvingApi public enum Operation extends Enum<Operation>
Describes the nature of a CDC event, mainly the type of action performed
on a database record: insertion, update and deletion. There are also
some special values: "sync", which has the same effect as an insert, but
originates from the initial database snapshot (as opposed to the
database changelog), and "unspecified", used for a few special CDC
events (like heartbeats).
- Since:
- 4.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description DELETE
Record deletion, sourced from the DB changelog.INSERT
Record insertion, sourced from the DB changelog.SYNC
Just likeINSERT
, but coming from the initial DB snapshot (as opposed to the change log).UNSPECIFIED
ChangeRecord
doesn't have an operation field, for example heartbeats.UPDATE
Record update, sourced from the DB changelog. -
Method Summary
Modifier and Type Method Description static Operation
get(String opcode)
Parses the string present in a CDC message into the correspondingOperation
enum member.static Operation
valueOf(String name)
Returns the enum constant of this type with the specified name.static Operation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNSPECIFIED
ChangeRecord
doesn't have an operation field, for example heartbeats. -
SYNC
Just likeINSERT
, but coming from the initial DB snapshot (as opposed to the change log). -
INSERT
Record insertion, sourced from the DB changelog. -
UPDATE
Record update, sourced from the DB changelog. -
DELETE
Record deletion, sourced from the DB changelog.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
get
Parses the string present in a CDC message into the correspondingOperation
enum member.If the argument is
null
, it returnsUNSPECIFIED
.- Throws:
ParsingException
- if the input string doesn't represent an expected value
-