Package com.illumon.iris.db.v2.remote
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:
- A viewport, which means locally we are an
PreemptiveUpdatesTable, and send deltas for rows that are within a clients viewport. - A snapshot viewport, which means locally we are an
SubscriptionSnapshotTable, and send entire snapshots for rows that are within a clients viewport. - A
PreemptiveUpdatesTablethat 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 TypeMethodDescriptionbooleanaddSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int handleId, BitSet columnsToSubscribe, boolean isViewport) Add a subscription to this table.booleanTrue if this table is a snapshot table (as opposed to a preemptive updates table); used byRemoteQueryProcessorto set the isSnapshot flag onExportedTableCreationMessagemessages, so that a client knows if it has an appropriate type of table for its viewport.booleanremoveSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId) Remove a subscription.booleanupdateSubscription(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, BitSet newSubscribedColumns) Update the subscription's columns.booleanupdateViewport(io.deephaven.enterprise.comm.api.CommandSender client, int subscriptionId, Index newViewPort) Update the subscription's viewport (rows).booleanupdateViewportAndColumns(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 responseshandleId- the ID of our subscriptioncolumnsToSubscribe- the bitset of columns to subscribe toisViewport- 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 responsessubscriptionId- the ID of our subscriptionnewSubscribedColumns- 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 responsessubscriptionId- the ID of our subscriptionnewViewPort- 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 responsessubscriptionId- the ID of our subscriptionnewViewPort- 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 responsessubscriptionId- 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 byRemoteQueryProcessorto set the isSnapshot flag onExportedTableCreationMessagemessages, 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.
-