Class NoSQLSubscriptionConfig

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

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

    • DEFAULT_EMPTY_STREAM_LIFETIME_SECS

      public static final int DEFAULT_EMPTY_STREAM_LIFETIME_SECS
      Default empty stream lifetime in seconds
      See Also:
    • 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:
  • Method Details

    • getCkptTableName

      public String getCkptTableName()
      Gets the name of checkpoint table associated with subscription
      Returns:
      the full namespace name of checkpoint table
    • 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.
      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
    • 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