Enum Class Operation

java.lang.Object
java.lang.Enum<Operation>
com.hazelcast.enterprise.jet.cdc.Operation
All Implemented Interfaces:
Serializable, Comparable<Operation>, Constable

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:
5.5
  • Enum Constant Details

    • UNSPECIFIED

      public static final Operation UNSPECIFIED
      ChangeRecord doesn't have an operation field, for example heartbeats.
    • SYNC

      public static final Operation SYNC
      Just like INSERT, but coming from the initial DB snapshot (as opposed to the change log).
    • INSERT

      public static final Operation INSERT
      Record insertion, sourced from the DB changelog.
    • UPDATE

      public static final Operation UPDATE
      Record update, sourced from the DB changelog.
    • DELETE

      public static final Operation DELETE
      Record deletion, sourced from the DB changelog.
  • Method Details

    • values

      public static Operation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Operation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public String code()
      Returns the Debezium operation code as String.
    • get

      public static Operation get(@Nullable String opcode) throws ParsingException
      Parses the string present in a CDC message into the corresponding Operation enum member.

      If the argument is null, it returns UNSPECIFIED.

      Throws:
      ParsingException - if the input string doesn't represent an expected value