Class TableSubscription


@JsType(namespace="dh") public final class TableSubscription extends AbstractTableSubscription
Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes. Unlike TableViewportSubscription, the "original" table does not have a reference to this instance, only the "private" table instance does, since the original cannot modify the subscription, and the private instance must forward data to it. Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the subscription must be closed and a new one optioned to see those changes. The event model is slightly different from viewports to make it less expensive to compute for large tables.
  • Constructor Details

    • TableSubscription

      @JsIgnore public TableSubscription(elemental2.core.JsArray<Column> columns, JsTable existingTable, Double updateIntervalMs)
  • Method Details

    • sendFirstSubscriptionRequest

      protected void sendFirstSubscriptionRequest()
      Specified by:
      sendFirstSubscriptionRequest in class AbstractTableSubscription
    • changeSubscription

      public void changeSubscription(elemental2.core.JsArray<Column> columns, @JsNullable Double updateIntervalMs)
      Updates the subscription to use the given columns and update interval.
      Parameters:
      columns - the new columns to subscribe to
      updateIntervalMs - the new update interval, or null/omit to use the default of one second
    • getColumns

      @JsProperty public elemental2.core.JsArray<Column> getColumns()
      Description copied from class: AbstractTableSubscription
      The columns that were subscribed to when this subscription was created
      Overrides:
      getColumns in class AbstractTableSubscription
      Returns:
      Column