Class WatermarkedBatch

java.lang.Object
org.gridgain.internal.cdc.api.source.WatermarkedBatch

public class WatermarkedBatch extends Object
A batch of change events read from a CdcSource together with the resumable watermark the source assigns to it.

The watermark is an opaque, source-defined byte sequence (a GridGain continuous-query watermark, an external-source log position such as a SQL Server LSN, etc.). It is persisted as-is by the replication machinery and handed back to CdcSource.start(org.gridgain.internal.cdc.api.source.SourceTableDefinition, byte[], org.gridgain.internal.cdc.api.replication.CdcReplicationMode, java.util.concurrent.Flow.Subscriber<org.gridgain.internal.cdc.api.source.WatermarkedBatch>) to resume after a restart, so the source alone decides how to interpret it.

  • Constructor Summary

    Constructors
    Constructor
    Description
    WatermarkedBatch(org.apache.ignite.table.TableRowEventBatch<Map.Entry<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>> batch, byte @Nullable [] watermark)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.ignite.table.TableRowEventBatch<Map.Entry<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>>
    Returns the change-event batch, in temporal order.
    byte @Nullable []
    Returns the resumable position for this batch, or null if the source has no watermark for it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WatermarkedBatch

      public WatermarkedBatch(org.apache.ignite.table.TableRowEventBatch<Map.Entry<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>> batch, byte @Nullable [] watermark)
      Constructor.
      Parameters:
      batch - The change-event batch, in temporal order.
      watermark - The resumable position for this batch, or null if the source has no watermark for it.
  • Method Details

    • batch

      public org.apache.ignite.table.TableRowEventBatch<Map.Entry<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>> batch()
      Returns the change-event batch, in temporal order.
    • watermark

      public byte @Nullable [] watermark()
      Returns the resumable position for this batch, or null if the source has no watermark for it.