Class ContinuousQueryOptions

java.lang.Object
org.apache.ignite.table.ContinuousQueryOptions

public class ContinuousQueryOptions extends Object
Continuous query options.
  • Field Details

  • Method Details

    • builder

      public static ContinuousQueryOptions.Builder builder()
      Creates a new builder.
      Returns:
      Builder.
    • pageSize

      public int pageSize()
      Gets the per-partition page size.

      Continuous Query polls every partition in a loop. This parameter controls the number of entries that will be requested from a single partition in one network call. Therefore, the maximum number of entries that the query may hold in memory at any given time is pageSize * partitions.

      Returns:
      Page size.
    • pollIntervalMs

      public int pollIntervalMs()
      Gets the poll interval in milliseconds.
      Returns:
      Poll interval in milliseconds.
    • eventTypes

      public EnumSet<TableRowEventType> eventTypes()
      Gets the included event types.
      Returns:
      Included event types.
    • columnNames

      @Nullable public @Nullable Set<String> columnNames()
      Gets the column names to include in the result.

      By default, all columns are included. Excluding columns will reduce the amount of data transferred over the network.

      Excluded columns are still present in the resulting entries, but are set to null.

      Returns:
      Included column names, or null to load all columns.
    • watermark

      @Nullable public @Nullable ContinuousQueryWatermark watermark()
      Gets the starting watermark. When null, the query will start from the current time.

      Watermark can be obtained with ContinuousQueryWatermark.ofInstant(Instant), or from an event with TableRowEvent.watermark(). The latter allows resuming a query from a specific event (excluding said event, providing exactly-once semantics).

      Returns:
      Starting watermark.
    • enableEmptyBatches

      public boolean enableEmptyBatches()
      Gets the flag that indicates whether empty batches are enabled.

      When enabled, empty batches will be sent to the subscriber when there are no new events. This is useful for watermark updates (see TableRowEventBatch.watermark()).

      Returns:
      True if empty batches are enabled, false otherwise.