Class WebBarrageSubscription
java.lang.Object
io.deephaven.web.client.api.barrage.data.WebBarrageSubscription
- Direct Known Subclasses:
WebBarrageSubscription.BlinkImpl
,WebBarrageSubscription.RedirectedImpl
,WebBarrageSubscription.ViewportImpl
In contrast to the server implementation, the JS API holds the "table" as distinct from the "subscription", so that
developers are acutely aware of extra async costs in requesting data, and can clearly indicate how much data is
requested. This class represents a barrage subscription for the JS API, and exposes access to the data presently
available on the client.
This is a rough analog to BarrageTable
and its subtypes, but isn't
directly exposed to API consumers. Instead, the subscription types wrap this, and delegate their data storage and
snapshot/delta handling here.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static interface
static class
static interface
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected long
static final boolean
protected final RangeSet
protected final WebBarrageSubscription.DataChangedHandler
protected WebColumnData[]
static final int
protected BitSet
protected boolean
protected RangeSet
protected final ClientTableState
protected final WebBarrageSubscription.ViewportChangedHandler
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WebBarrageSubscription
(ClientTableState state, WebBarrageSubscription.ViewportChangedHandler viewportChangedHandler, WebBarrageSubscription.DataChangedHandler dataChangedHandler, WebColumnData[] dataSinks) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
applyUpdates
(WebBarrageMessage message) long
abstract jsinterop.base.Any
getData
(long key, int col) Reads a value from the table subscription.boolean
protected boolean
isSubscribedColumn
(int ii) protected int
static WebBarrageSubscription
subscribe
(SubscriptionType subscriptionType, ClientTableState cts, WebBarrageSubscription.ViewportChangedHandler viewportChangedHandler, WebBarrageSubscription.DataChangedHandler dataChangedHandler) protected void
updateServerViewport
(RangeSet viewport, BitSet columns, boolean reverseViewport)
-
Field Details
-
COLUMNS_AS_LIST
public static final boolean COLUMNS_AS_LIST- See Also:
-
MAX_MESSAGE_SIZE
public static final int MAX_MESSAGE_SIZE- See Also:
-
BATCH_SIZE
public static final int BATCH_SIZE- See Also:
-
state
-
viewportChangedHandler
-
dataChangedHandler
-
currentRowSet
-
capacity
protected long capacity -
destSources
-
serverViewport
-
serverColumns
-
serverReverseViewport
protected boolean serverReverseViewport
-
-
Constructor Details
-
WebBarrageSubscription
protected WebBarrageSubscription(ClientTableState state, WebBarrageSubscription.ViewportChangedHandler viewportChangedHandler, WebBarrageSubscription.DataChangedHandler dataChangedHandler, WebColumnData[] dataSinks)
-
-
Method Details
-
subscribe
public static WebBarrageSubscription subscribe(SubscriptionType subscriptionType, ClientTableState cts, WebBarrageSubscription.ViewportChangedHandler viewportChangedHandler, WebBarrageSubscription.DataChangedHandler dataChangedHandler) -
applyUpdates
-
getCurrentSize
public long getCurrentSize()- Returns:
- the current size of the table
-
numColumns
protected int numColumns() -
getCurrentRowSet
-
getServerViewport
-
isReversed
public boolean isReversed() -
getData
public abstract jsinterop.base.Any getData(long key, int col) Reads a value from the table subscription.- Parameters:
key
- the row to read in key-spacecol
- the index of the column to read- Returns:
- the value read from the table
-
isSubscribedColumn
protected boolean isSubscribedColumn(int ii)
-