Enum Class DataStreamerSameKeyUpdateMode

java.lang.Object
java.lang.Enum<DataStreamerSameKeyUpdateMode>
org.apache.ignite.table.DataStreamerSameKeyUpdateMode
All Implemented Interfaces:
Serializable, Comparable<DataStreamerSameKeyUpdateMode>, Constable

public enum DataStreamerSameKeyUpdateMode extends Enum<DataStreamerSameKeyUpdateMode>
Controls how the data streamer handles multiple updates to the same key within one batch.

A batch is normally applied as a single implicit transaction with a single commit timestamp, so Continuous Query observes only the final state of each key in the batch. PRESERVE splits the batch so that every same-key update produces a separate commit and a separate Continuous Query event.

See DataStreamerOptions.sameKeyUpdateMode().

  • Enum Constant Details

    • SQUASH

      public static final DataStreamerSameKeyUpdateMode SQUASH
      Default. Multiple updates to the same key within one batch are conflated to the final state. Continuous Query observes one event per affected key per batch.

      This is the most performant mode, recommended when only the final state matters.

    • PRESERVE

      public static final DataStreamerSameKeyUpdateMode PRESERVE
      Same-key updates within one batch are detected and the batch is split so that each update lands in a separate transaction with its own commit timestamp. Continuous Query observes one event per update.

      More expensive than SQUASH: each duplicate-key collision triggers an additional implicit transaction.

  • Method Details

    • values

      public static DataStreamerSameKeyUpdateMode[] 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 DataStreamerSameKeyUpdateMode 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
    • fromOrdinal

      public static DataStreamerSameKeyUpdateMode fromOrdinal(int ordinal) throws IllegalArgumentException
      Returns the enumerated value from its ordinal.
      Parameters:
      ordinal - Ordinal of enumeration constant.
      Throws:
      IllegalArgumentException - If no enumeration constant by ordinal.