Interface ContinuousQuerySource<T>

Type Parameters:
T - Entry type.
All Known Subinterfaces:
KeyValueView<K,V>, RecordView<R>

public interface ContinuousQuerySource<T>
Represents an object which can be queried continuously.

Row-Level Security

When row-level security (RLS) is enabled for the underlying table, read policies are enforced for every change event delivered to subscribers:

  • The read-access-restricted side of an event (old or new row) is replaced with null, as if the row did not exist at that point in time. The event type is preserved as-is:
    • An UPDATED event where the old version has read access restricted but the new version does not is delivered with tableRowEvent.oldEntry() == null.
    • An UPDATED event where the old version has no read access restriction but the new version does is delivered with tableRowEvent.entry() == null.
  • If read access is restricted for both the old and new versions of a row, the event is suppressed entirely and the subscriber does not receive it.
  • Method Details

    • queryContinuously

      void queryContinuously(Flow.Subscriber<TableRowEventBatch<T>> subscriber, @Nullable @Nullable ContinuousQueryOptions options)
      Starts a continuous query which listens to data events within the underlying table.
      Parameters:
      subscriber - Subscriber.
      options - Options (can be null).
    • queryContinuously

      default void queryContinuously(Flow.Subscriber<TableRowEventBatch<T>> subscriber)
      Starts a continuous query which listens to data events within the underlying table.
      Parameters:
      subscriber - Subscriber.
    • queryContinuously

      default void queryContinuously(Flow.Subscriber<TableRowEventBatch<T>> subscriber, @Nullable @Nullable ContinuousQueryOptions options, @Nullable @Nullable CancellationToken cancellationToken)
      Starts a continuous query which listens to data events within the underlying table.

      The query is stopped when either the subscription is cancelled via Flow.Subscription.cancel() or the provided CancellationToken is cancelled.

      Parameters:
      subscriber - Subscriber.
      options - Options (can be null).
      cancellationToken - Cancellation token (can be null). When cancelled, the continuous query is stopped as if Flow.Subscription.cancel() was called.