Package io.deephaven.client.impl
Class BarrageSubscriptionImpl
java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
io.deephaven.engine.liveness.ReferenceCountedLivenessNode
io.deephaven.client.impl.BarrageSubscriptionImpl
- All Implemented Interfaces:
LogOutputAppendable,BarrageSubscription,LivenessManager,LivenessNode,LivenessReferent
public class BarrageSubscriptionImpl
extends ReferenceCountedLivenessNode
implements BarrageSubscription
This class is an intermediary helper class that uses a
DoExchange to populate a BarrageTable using
subscription data from a remote server, propagating updates if the request is a subscription.
Users may call entireTable() or partialTable(io.deephaven.engine.rowset.RowSet, java.util.BitSet) to initiate the gRPC call to the server. These methods
return a Future<BarrageTable> to the user.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.deephaven.client.impl.BarrageSubscription
BarrageSubscription.Factory -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddestroy()Attempt to release (destructively when necessary) resources held by this object.Request a full subscription of the data and populate aTablewith the incrementally updating data that is received.static io.grpc.MethodDescriptor<org.apache.arrow.flight.impl.Flight.FlightData,BarrageMessage> getClientDoExchangeDescriptor(BarrageSubscriptionOptions options, ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, BarrageMessageReader streamReader) Fetch the client side descriptor for a specific table schema.partialTable(RowSet viewport, BitSet columns) Request a partial subscription of the data limited by viewport or column set and populate aTablewith the data that is received.partialTable(RowSet viewport, BitSet columns, boolean reverseViewport) Request a partial subscription of the data limited by viewport or column set and populate aTablewith the data that is received.Request a full snapshot of the data and populate aTablewith the incrementally updating data that is received.snapshotPartialTable(RowSet viewport, BitSet columns) Request a partial snapshot of the data limited by viewport or column set and populate aTablewith the data that is received.snapshotPartialTable(RowSet viewport, BitSet columns, boolean reverseViewport) Request a partial snapshot of the data limited by viewport or column set and populate aTablewith the data that is received.Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, unmanage, unmanageMethods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, retainReference, tryRetainReference
-
Method Details
-
entireTable
Description copied from interface:BarrageSubscriptionRequest a full subscription of the data and populate aTablewith the incrementally updating data that is received. The returned future will block until all rows for the subscribed table are available.- Specified by:
entireTablein interfaceBarrageSubscription- Returns:
- a
Futurethat will be populated with the resultTable
-
partialTable
Description copied from interface:BarrageSubscriptionRequest a partial subscription of the data limited by viewport or column set and populate aTablewith the data that is received. The returned future will block until the subscribed table viewport is satisfied.- Specified by:
partialTablein interfaceBarrageSubscription- Parameters:
viewport- the position-space viewport to use for the subscriptioncolumns- the columns to include in the subscription- Returns:
- a
Futurethat will be populated with the resultTable
-
snapshotEntireTable
Description copied from interface:BarrageSubscriptionRequest a full snapshot of the data and populate aTablewith the incrementally updating data that is received. The returned future will block until all rows for the snapshot table are available.- Specified by:
snapshotEntireTablein interfaceBarrageSubscription- Returns:
- a
Futurethat will be populated with the resultTable
-
snapshotPartialTable
Description copied from interface:BarrageSubscriptionRequest a partial snapshot of the data limited by viewport or column set and populate aTablewith the data that is received. The returned future will block until the snapshot table viewport is satisfied.- Specified by:
snapshotPartialTablein interfaceBarrageSubscription- Parameters:
viewport- the position-space viewport to use for the subscriptioncolumns- the columns to include in the subscription- Returns:
- a
Futurethat will be populated with the resultTable
-
snapshotPartialTable
Description copied from interface:BarrageSubscriptionRequest a partial snapshot of the data limited by viewport or column set and populate aTablewith the data that is received. Allows the viewport to be reversed. The returned future will block until the snapshot table viewport is satisfied.- Specified by:
snapshotPartialTablein interfaceBarrageSubscription- Parameters:
viewport- the position-space viewport to use for the subscriptioncolumns- the columns to include in the subscriptionreverseViewport- Whether to treatposRowSetas offsets fromLongSizedDataStructure.size()rather than0- Returns:
- a
Futurethat will be populated with the resultTable
-
partialTable
Description copied from interface:BarrageSubscriptionRequest a partial subscription of the data limited by viewport or column set and populate aTablewith the data that is received. Allows the viewport to be reversed. The returned future will block until the subscribed table viewport is satisfied.- Specified by:
partialTablein interfaceBarrageSubscription- Parameters:
viewport- the position-space viewport to use for the subscriptioncolumns- the columns to include in the subscriptionreverseViewport- Whether to treatposRowSetas offsets fromLongSizedDataStructure.size()rather than0- Returns:
- a
Futurethat will be populated with the resultTable
-
destroy
@OverridingMethodsMustInvokeSuper protected void destroy()Description copied from class:ReferenceCountedLivenessReferentAttempt to release (destructively when necessary) resources held by this object. This may render the object unusable for subsequent operations. Implementations should be sure to call super.destroy().This is intended to only ever be used as a side effect of decreasing the reference count to 0.
- Overrides:
destroyin classReferenceCountedLivenessReferent
-
append
- Specified by:
appendin interfaceLogOutputAppendable- Overrides:
appendin classReferenceCounted
-
getClientDoExchangeDescriptor
public static io.grpc.MethodDescriptor<org.apache.arrow.flight.impl.Flight.FlightData,BarrageMessage> getClientDoExchangeDescriptor(BarrageSubscriptionOptions options, ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, BarrageMessageReader streamReader) Fetch the client side descriptor for a specific table schema.- Parameters:
options- the set of options that last across the entire life of the subscriptioncolumnChunkTypes- the chunk types per columncolumnTypes- the class type per columncomponentTypes- the component class type per columnstreamReader- the stream reader - intended to be thread safe and re-usable- Returns:
- the client side method descriptor
-