Package oracle.kv.pubsub

# Class NoSQLSubscriptionConfig

java.lang.Object
oracle.kv.pubsub.NoSQLSubscriptionConfig

public class NoSQLSubscriptionConfig extends Object
Configuration used by the NoSQL Publisher to create a subscription.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `NoSQLSubscriptionConfig.Builder`
  Builder to construct a NoSQLSubscriptionConfig instance
  `static enum`
  `NoSQLSubscriptionConfig.StreamDeliveryMode`
  Delivery mode of subscribe tables

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DEFAULT_EMPTY_STREAM_LIFETIME_SECS`
  Default empty stream lifetime in seconds
  `static final int`
  `DEFAULT_OUTPUT_QUEUE_SIZE_MB`
  Default total memory size in megabytes of output queues for all shards
  `static final int`
  `DEFAULT_STREAM_CHANGE_TIMEOUT_MS`
  Default timeout in ms to change the stream, e.g, add or remove tables from stream

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getCkptTableName()`
  Gets the name of checkpoint table associated with subscription for this subscriber.
  `int`
  `getEmptyStreamSecs()`
  Returns the lifetime in seconds of empty subscription.
  `boolean`
  `getIncludeBeforeImage()`
  Returns true if the stream should include before image, false otherwise.
  `StreamPosition`
  `getInitialPosition()`
  Returns the initial stream position to be used when creating a Subscription.
  `NoSQLStreamMode`
  `getStreamMode()`
  Returns the start stream mode.
  `NoSQLSubscriberId`
  `getSubscriberId()`
  Gets the subscriber ID of the configuration.
  `Set<String>`
  `getTables()`
  Returns the tables to be associated with a subscription.
  `int`
  `getTotalOutputQueueSizeMB()`
  Returns the total memory size of output queues in megabytes for all shards.
  `static boolean`
  `subscriberIncludesShard(NoSQLSubscriberId si, oracle.kv.impl.topo.RepGroupId shardId)`
  Returns true if the given shard should be included in the given subscriber.
  `String`
  `toString()`
  `boolean`
  `useNewCheckpointTable()`
  Returns true if the subscription should attempt to create the checkpoint table if it doesn't already exist.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_EMPTY_STREAM_LIFETIME_SECS

    public static final int DEFAULT_EMPTY_STREAM_LIFETIME_SECS
    Default empty stream lifetime in seconds
    See Also:
      - Constant Field Values

  - ### DEFAULT_STREAM_CHANGE_TIMEOUT_MS

    public static final int DEFAULT_STREAM_CHANGE_TIMEOUT_MS
    Default timeout in ms to change the stream, e.g, add or remove tables from stream
    See Also:
      - Constant Field Values

  - ### DEFAULT_OUTPUT_QUEUE_SIZE_MB

    public static final int DEFAULT_OUTPUT_QUEUE_SIZE_MB
    Default total memory size in megabytes of output queues for all shards
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getCkptTableName

    public String getCkptTableName()
    Gets the name of checkpoint table associated with subscription for this subscriber.
    Returns:
      the full namespace name of checkpoint table for this subscriber

  - ### getInitialPosition

    public StreamPosition getInitialPosition()
    Returns the initial stream position to be used when creating a Subscription. The first call to `onNext()` by the Publisher will `signal` the element following this position in the stream.

    If stream mode is `NoSQLStreamMode.FROM_NOW`, `NoSQLStreamMode.FROM_CHECKPOINT`, or `NoSQLStreamMode.FROM_EXACT_CHECKPOINT`, it always returns null since these modes do not use the initial position specified in config.

  - ### getSubscriberId

    public NoSQLSubscriberId getSubscriberId()
    Gets the subscriber ID of the configuration.
    Returns:
      subscriber ID

  - ### getTables

    public Set<String> getTables()
    Returns the tables to be associated with a subscription. If null or an empty set, it means all tables be streamed.

  - ### useNewCheckpointTable

    public boolean useNewCheckpointTable()
    Returns true if the subscription should attempt to create the checkpoint table if it doesn't already exist. This applies to its own checkpoint table only.
    Returns:
      true if new checkpoint table should be created if needed

  - ### getEmptyStreamSecs

    public int getEmptyStreamSecs()
    Returns the lifetime in seconds of empty subscription.
    Returns:
      the lifetime of empty subscription

  - ### getTotalOutputQueueSizeMB

    public int getTotalOutputQueueSizeMB()
    Returns the total memory size of output queues in megabytes for all shards.
    Returns:
      the total memory size of output queues in megabytes for all shards.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### subscriberIncludesShard

    public static boolean subscriberIncludesShard(NoSQLSubscriberId si, oracle.kv.impl.topo.RepGroupId shardId)
    Returns true if the given shard should be included in the given subscriber.
    Parameters:
      `si` - subscriber id
      `shardId` - shard id
    Returns:
      true if the given shard should be included in the given subscriber, false otherwise.

  - ### getStreamMode

    public NoSQLStreamMode getStreamMode()
    Returns the start stream mode.
    Returns:
      the start stream mode

  - ### getIncludeBeforeImage

    public boolean getIncludeBeforeImage()
    Returns true if the stream should include before image, false otherwise.