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 classstatic interfacestatic classstatic interfacestatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected longstatic final booleanprotected final RangeSetprotected final WebBarrageSubscription.DataChangedHandlerprotected WebColumnData[]static final intprotected BitSetprotected booleanprotected RangeSetprotected final ClientTableStateprotected final WebBarrageSubscription.ViewportChangedHandler -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWebBarrageSubscription(ClientTableState state, WebBarrageSubscription.ViewportChangedHandler viewportChangedHandler, WebBarrageSubscription.DataChangedHandler dataChangedHandler, WebColumnData[] dataSinks) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidapplyUpdates(WebBarrageMessage message) longabstract jsinterop.base.AnygetData(long key, int col) Reads a value from the table subscription.booleanprotected booleanisSubscribedColumn(int ii) protected intstatic WebBarrageSubscriptionsubscribe(SubscriptionType subscriptionType, ClientTableState cts, WebBarrageSubscription.ViewportChangedHandler viewportChangedHandler, WebBarrageSubscription.DataChangedHandler dataChangedHandler) protected voidupdateServerViewport(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)
-