Class BarrageSubscriptionOptions

java.lang.Object
io.deephaven.extensions.barrage.BarrageSubscriptionOptions
All Implemented Interfaces:
StreamReaderOptions

@Immutable public abstract class BarrageSubscriptionOptions extends Object implements StreamReaderOptions
  • Constructor Details

    • BarrageSubscriptionOptions

      public BarrageSubscriptionOptions()
  • Method Details

    • builder

      public static BarrageSubscriptionOptions.Builder builder()
    • of

      public static BarrageSubscriptionOptions of(io.deephaven.barrage.flatbuf.BarrageSubscriptionOptions options)
    • of

      public static BarrageSubscriptionOptions of(io.deephaven.barrage.flatbuf.BarrageSubscriptionRequest subscriptionRequest)
    • useDeephavenNulls

      @Default public boolean useDeephavenNulls()
      Specified by:
      useDeephavenNulls in interface StreamReaderOptions
      Returns:
      whether we encode the validity buffer to express null values or QueryConstants's NULL values.
    • columnsAsList

      @Default public boolean columnsAsList()
      Description copied from interface: StreamReaderOptions
      Some Flight clients cannot handle modifications that have irregular column counts. These clients request that the server wrap all columns in a list to enable each column having a variable length.
      Specified by:
      columnsAsList in interface StreamReaderOptions
      Returns:
      true if the columns should be wrapped in a list
    • minUpdateIntervalMs

      @Default public int minUpdateIntervalMs()
      By default, we should not specify anything; the server will use whatever it is configured with. If multiple subscriptions exist on a table (via the same client or via multiple clients) then the server will re-use state needed to perform barrage-acrobatics for both of them. This greatly reduces the burden each client adds to the server's workload. If a given table does want a shorter interval, consider using that shorter interval for all subscriptions to that table.

      The default interval can be set on the server with the flag io.deephaven.server.arrow.ArrowFlightUtil#DEFAULT_UPDATE_INTERVAL_MS, or -Dbarrage.minUpdateInterval=1000.

      Related, when shortening the minUpdateInterval, you typically want to shorten the server's UGP cycle enough to update at least as quickly. This can be done on the server with the flag io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph#defaultTargetCycleTime, or -DPeriodicUpdateGraph.targetcycletime=1000.

      Returns:
      the update interval to subscribe for
    • batchSize

      @Default public int batchSize()
      Specified by:
      batchSize in interface StreamReaderOptions
      Returns:
      the ideal number of records to send per record batch
    • maxMessageSize

      @Default public int maxMessageSize()
      Specified by:
      maxMessageSize in interface StreamReaderOptions
      Returns:
      the maximum number of bytes that should be sent in a single message.
    • previewListLengthLimit

      @Default public long previewListLengthLimit()
      Description copied from interface: StreamReaderOptions
      The maximum length of any list / array to encode.
      • If zero, list lengths will not be limited.
      • If non-zero, the server will limit the length of any encoded list / array to the absolute value of the returned length.
      • If less than zero, the server will encode elements from the end of the list / array, rather than rom the beginning.

      Note: The server is unable to indicate when truncation occurs. To detect truncation request one more element than the maximum number you wish to display.

      Specified by:
      previewListLengthLimit in interface StreamReaderOptions
      Returns:
      the maximum length of any list / array to encode; zero means no limit; negative values indicate to treat the limit as a tail instead of a head
    • appendTo

      public int appendTo(com.google.flatbuffers.FlatBufferBuilder builder)