Interface SubscribableTable

All Known Implementing Classes:
PreemptiveUpdatesTable, SubscriptionSnapshotTable

public interface SubscribableTable

This is a base interface for the RemoteQueryProcessor to use for exporting tables that you can subscribe to i.e. Table.supportsPreemptiveSubscription() will return true.

Presently, that means you are one of the following:

  1. A viewport, which means locally we are an PreemptiveUpdatesTable, and send deltas for rows that are within a clients viewport.
  2. A snapshot viewport, which means locally we are an SubscriptionSnapshotTable, and send entire snapshots for rows that are within a clients viewport.
  3. A PreemptiveUpdatesTable that is fully subscribed, which means the client has a consistent view that can be used from query operations.

On the client side, these are all represented by a ReplicatedTable, but they have different semantics.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int handleId, BitSet columnsToSubscribe, boolean isViewport)
    Add a subscription to this table.
    boolean
    True if this table is a snapshot table (as opposed to a preemptive updates table); used by RemoteQueryProcessor to set the isSnapshot flag on ExportedTableCreationMessage messages, so that a client knows if it has an appropriate type of table for its viewport.
    boolean
    removeSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId)
    Remove a subscription.
    boolean
    updateSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, BitSet newSubscribedColumns)
    Update the subscription's columns.
    boolean
    updateViewport(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, Index newViewPort)
    Update the subscription's viewport (rows).
    boolean
    updateViewportAndColumns(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, Index newViewPort, BitSet columnsToSubscribe)
    Update the subscription's columns and viewport (rows).
  • Method Details

    • addSubscription

      boolean addSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int handleId, BitSet columnsToSubscribe, boolean isViewport)
      Add a subscription to this table.
      Parameters:
      client - the client requesting the subscription, used to uniquely identify he handleId and send deltas, snapshots and responses
      handleId - the ID of our subscription
      columnsToSubscribe - the bitset of columns to subscribe to
      isViewport - true if the subscription is a viewport, false if it is a full subscription
      Returns:
      true if the subscription was added
    • updateSubscription

      boolean updateSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, BitSet newSubscribedColumns)
      Update the subscription's columns.
      Parameters:
      client - the client requesting the subscription, used to send deltas, snapshots and responses
      subscriptionId - the ID of our subscription
      newSubscribedColumns - the bitset of columns to subscribe to
      Returns:
      true if the subscription was found and updated
    • updateViewport

      boolean updateViewport(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, Index newViewPort)
      Update the subscription's viewport (rows).
      Parameters:
      client - the client requesting the subscription, used to send deltas, snapshots and responses
      subscriptionId - the ID of our subscription
      newViewPort - the index representing which rows to subscribe to (in position space)
      Returns:
      true if the subscription was found and updated
    • updateViewportAndColumns

      boolean updateViewportAndColumns(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, Index newViewPort, BitSet columnsToSubscribe)
      Update the subscription's columns and viewport (rows).
      Parameters:
      client - the client requesting the subscription, used to send deltas, snapshots and responses
      subscriptionId - the ID of our subscription
      newViewPort - the index representing which rows to subscribe to (in position space)
      columnsToSubscribe - the bitset of columns to subscribe to
      Returns:
      true if the subscription was found and updated
    • removeSubscription

      boolean removeSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId)
      Remove a subscription.
      Parameters:
      client - the client requesting the subscription, used to send responses
      subscriptionId - the ID of our subscription
      Returns:
      true if the subscription was found and updated
    • isSnapshot

      boolean isSnapshot()
      True if this table is a snapshot table (as opposed to a preemptive updates table); used by RemoteQueryProcessor to set the isSnapshot flag on ExportedTableCreationMessage messages, so that a client knows if it has an appropriate type of table for its viewport.
      Returns:
      true if this is a subscription snapshot table.