Interface SubscriptionOptions.Builder

Enclosing interface:
SubscriptionOptions

public static interface SubscriptionOptions.Builder
Implementations of this interface can be used to construct a new SubscriptionOptions.
  • Method Details

    • clearOnDisconnect

      @NotNull SubscriptionOptions.Builder clearOnDisconnect(boolean clearOnDisconnect)
      Set if the result table should clear its rows when a disconnect occurs. Defaults to true.
      Parameters:
      clearOnDisconnect - if the result table should clear rows on disconnection
      Returns:
      this SubscriptionOptions.Builder
    • retryWindowMillis

      @NotNull SubscriptionOptions.Builder retryWindowMillis(long retryWindowMillis)
      Set the width of the window in milliseconds in which to attempt to reconnect. Defaults to 60 seconds, unless changed via the ConnectionAwareRemoteTableParams.retryWindowMillis property.
      Parameters:
      retryWindowMillis - the reconnection window in milliseconds
      Returns:
      this SubscriptionOptions.Builder
    • maxRetriesWithinWindow

      @NotNull SubscriptionOptions.Builder maxRetriesWithinWindow(long maxRetriesInWindow)
      Set the maximum number of retries to attempt within the window. Defaults to 5, unless changed via tha ConnectionAwareRemoteTableParams.maxRetries property.
      Parameters:
      maxRetriesInWindow - the maximum allowed retries in the window
      Returns:
      this SubscriptionOptions.Builder
    • addIncludedColumns

      @NotNull SubscriptionOptions.Builder addIncludedColumns(@NotNull String... columns)
      Set the columns to subscribe to from the upstream. Defaults to all columns.
      Parameters:
      columns - the columns to include.
      Returns:
      this SubscriptionOptions.Builder
    • addAllIncludedColumns

      @NotNull SubscriptionOptions.Builder addAllIncludedColumns(@NotNull Iterable<String> columns)
      Set the columns to subscribe to from the upstream. Defaults to all columns.
      Parameters:
      columns - the columns to subscribe
      Returns:
      this SubscriptionOptions.Builder
    • build

      @NotNull SubscriptionOptions build()
      Construct a new SubscriptionOptions from this builder state.
      Returns:
      a new SubscriptionOptions.