Package io.deephaven.extensions.barrage
Interface BarrageStreamGenerator
- All Superinterfaces:
AutoCloseable
,SafeCloseable
- All Known Implementing Classes:
BarrageStreamGeneratorImpl
A StreamGenerator takes a BarrageMessage and re-uses portions of the serialized payload across different subscribers
that may subscribe to different viewports and columns.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
Represents a single update, which might be sent as multiple distinct payloads as necessary based in the implementation. -
Method Summary
Modifier and TypeMethodDescriptiongetSnapshotView
(BarrageSnapshotOptions options) Obtain a Full-Snapshot View of this StreamGenerator that can be sent to a single requestor.getSnapshotView
(BarrageSnapshotOptions options, @Nullable RowSet viewport, boolean reverseViewport, @Nullable RowSet keyspaceViewport, BitSet snapshotColumns) Obtain a View of this StreamGenerator that can be sent to a single requestor.getSubView
(BarrageSubscriptionOptions options, boolean isInitialSnapshot) Obtain a Full-Subscription View of this StreamGenerator that can be sent to a single subscriber.getSubView
(BarrageSubscriptionOptions options, boolean isInitialSnapshot, boolean isFullSubscription, @Nullable RowSet viewport, boolean reverseViewport, @Nullable RowSet keyspaceViewportPrev, @Nullable RowSet keyspaceViewport, BitSet subscribedColumns) Obtain a View of this StreamGenerator that can be sent to a single subscriber.Methods inherited from interface io.deephaven.util.SafeCloseable
close
-
Method Details
-
getMessage
BarrageMessage getMessage()- Returns:
- the BarrageMessage that this generator is operating on
-
getSubView
BarrageStreamGenerator.MessageView getSubView(BarrageSubscriptionOptions options, boolean isInitialSnapshot) Obtain a Full-Subscription View of this StreamGenerator that can be sent to a single subscriber.- Parameters:
options
- serialization options for this specific viewisInitialSnapshot
- indicates whether this is the first snapshot for the listener- Returns:
- a MessageView filtered by the subscription properties that can be sent to that subscriber
-
getSubView
BarrageStreamGenerator.MessageView getSubView(BarrageSubscriptionOptions options, boolean isInitialSnapshot, boolean isFullSubscription, @Nullable @Nullable RowSet viewport, boolean reverseViewport, @Nullable @Nullable RowSet keyspaceViewportPrev, @Nullable @Nullable RowSet keyspaceViewport, BitSet subscribedColumns) Obtain a View of this StreamGenerator that can be sent to a single subscriber.Note that all passed in arguments are owned by the caller and may be modified external to this method.
- Parameters:
options
- serialization options for this specific viewisInitialSnapshot
- indicates whether this is the first snapshot for the listenerisFullSubscription
- whether this is a full subscription (possibly a growing viewport)viewport
- is the position-space viewportreverseViewport
- is the viewport reversed (relative to end of table instead of beginning)keyspaceViewportPrev
- is the key-space viewport prior to applying the updatekeyspaceViewport
- is the key-space viewportsubscribedColumns
- are the columns subscribed for this view- Returns:
- a MessageView filtered by the subscription properties that can be sent to that subscriber
-
getSnapshotView
Obtain a Full-Snapshot View of this StreamGenerator that can be sent to a single requestor.- Parameters:
options
- serialization options for this specific view- Returns:
- a MessageView filtered by the snapshot properties that can be sent to that requestor
-
getSnapshotView
BarrageStreamGenerator.MessageView getSnapshotView(BarrageSnapshotOptions options, @Nullable @Nullable RowSet viewport, boolean reverseViewport, @Nullable @Nullable RowSet keyspaceViewport, BitSet snapshotColumns) Obtain a View of this StreamGenerator that can be sent to a single requestor.Note that all passed in arguments are owned by the caller and may be modified external to this method.
- Parameters:
options
- serialization options for this specific viewviewport
- is the position-space viewportreverseViewport
- is the viewport reversed (relative to end of table instead of beginning)snapshotColumns
- are the columns included for this view- Returns:
- a MessageView filtered by the snapshot properties that can be sent to that requestor
-