Class TableSubscription
java.lang.Object
io.deephaven.web.client.api.event.HasEventHandling
io.deephaven.web.client.api.subscription.AbstractTableSubscription
io.deephaven.web.client.api.subscription.TableSubscription
- All Implemented Interfaces:
Revivable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.web.client.api.subscription.AbstractTableSubscription
AbstractTableSubscription.Status, AbstractTableSubscription.SubscriptionEventData, AbstractTableSubscription.SubscriptionRow, AbstractTableSubscription.UpdateEventData, AbstractTableSubscription.ViewportEventDataNested classes/interfaces inherited from class io.deephaven.web.client.api.event.HasEventHandling
HasEventHandling.EventPair<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe connection to the server was lost.static final StringThe connection is back and the subscription has been re-sent to the server; data follows inupdatedevents.static final StringThe server-side table this subscription reads could not be re-established after a reconnect.static final StringThe server ended this subscription with an error;event.detailis the server's message.Fields inherited from class io.deephaven.web.client.api.subscription.AbstractTableSubscription
barrageSubscription, EVENT_UPDATED, rowStyleColumn, status, viewportRowSetFields inherited from class io.deephaven.web.client.api.event.HasEventHandling
INTERNAL_EVENT_RELEASED -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeSubscription(elemental2.core.ReadonlyArray<Column.ColumnOrName> columns, @JsNullable Double updateIntervalMs) Deprecated.a full subscription cannot be changed; close it and create a new one.static TableSubscriptioncreateTableSubscription(DataOptions.SubscriptionOptions options, JsTable existingTable) static TableSubscriptioncreateTableSubscription(DataOptions.SubscriptionOptions options, WorkerConnection connection, ClientTableState tableState) Creates a full subscription on a state; nothing about the owning table is needed.elemental2.core.JsArray<Column> The columns that were subscribed to when this subscription was createdprotected voidvoidupdate(@TsTypeRef(SubscriptionOptions.class) Object options) Deprecated.a full subscription cannot be changed; close it and create a new one.Methods inherited from class io.deephaven.web.client.api.subscription.AbstractTableSubscription
close, connection, createPreview, createSnapshot, die, getPreviewListLengthLimit, hasValidSize, isClosed, isSubscriptionReady, makeColumnBitset, notifyUpdate, onStreamEnd, revive, revive, sendBarrageSubscriptionRequest, size, state, subscriptionRequest, unknownColumnMethods inherited from class io.deephaven.web.client.api.event.HasEventHandling
addEventListener, addEventListenerOneShot, addEventListenerOneShot, failureHandled, fireCriticalEvent, fireCriticalEvent, fireEvent, fireEvent, fireEvent, hasListener, hasListeners, isSuppress, logPrefix, nextEvent, removeEventListener, suppressEvents, unsuppressEvents
-
Field Details
-
EVENT_DISCONNECT
The connection to the server was lost. Noupdatedevents fire until it is back. The subscription is re-sent automatically;EVENT_RECONNECTfires when the server reconnects, orEVENT_RECONNECTFAILEDfires if it cannot.- See Also:
-
EVENT_RECONNECT
The connection is back and the subscription has been re-sent to the server; data follows inupdatedevents.- See Also:
-
EVENT_RECONNECTFAILED
The server-side table this subscription reads could not be re-established after a reconnect. The subscription is closed; create a new one from a live table.event.detaildescribes the failure. This says nothing about the connection as a whole.- See Also:
-
EVENT_REQUEST_FAILED
The server ended this subscription with an error;event.detailis the server's message. The subscription is closed and no more data will come; such failures are not recoverable, create a new subscription.- See Also:
-
-
Method Details
-
createTableSubscription
public static TableSubscription createTableSubscription(DataOptions.SubscriptionOptions options, JsTable existingTable) -
createTableSubscription
@JsIgnore public static TableSubscription createTableSubscription(DataOptions.SubscriptionOptions options, WorkerConnection connection, ClientTableState tableState) Creates a full subscription on a state; nothing about the owning table is needed. -
sendFirstSubscriptionRequest
protected void sendFirstSubscriptionRequest()- Specified by:
sendFirstSubscriptionRequestin classAbstractTableSubscription
-
changeSubscription
@Deprecated public void changeSubscription(elemental2.core.ReadonlyArray<Column.ColumnOrName> columns, @JsOptional @JsNullable Double updateIntervalMs) Deprecated.a full subscription cannot be changed; close it and create a new one.Always throws: the server does not allow a full subscription to change. Close this subscription and create a new one with the columns you want.- Parameters:
columns- ignoredupdateIntervalMs- ignored
-
update
@Deprecated @JsMethod public void update(@TsTypeRef(SubscriptionOptions.class) @TsTypeRef(SubscriptionOptions.class) Object options) Deprecated.a full subscription cannot be changed; close it and create a new one.Always throws: the server does not allow a full subscription to change. Close this subscription and create a new one with the options you want.- Parameters:
options- ignored
-
getColumns
Description copied from class:AbstractTableSubscriptionThe columns that were subscribed to when this subscription was created- Overrides:
getColumnsin classAbstractTableSubscription- Returns:
Column
-