Package oracle.kv.pubsub
Class NoSQLSubscriptionConfig
java.lang.Object
oracle.kv.pubsub.NoSQLSubscriptionConfig
Configuration used by the NoSQL Publisher to create a subscription.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder to construct a NoSQLSubscriptionConfig instance -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Default empty stream lifetime in secondsstatic final int
Default timeout in ms to change the stream, e.g, add or remove tables from stream -
Method Summary
Modifier and TypeMethodDescriptionGets the name of checkpoint table associated with subscriptionint
Returns the lifetime in seconds of empty subscription.Returns the initial stream position to be used when creating a Subscription.Returns the start stream mode.Gets the subscriber ID of the configuration.Returns the tables to be associated with a subscription.static boolean
subscriberIncludesShard
(NoSQLSubscriberId si, oracle.kv.impl.topo.RepGroupId shardId) Returns true if the given shard should be included in the given subscriber.toString()
boolean
Returns true if the subscription should attempt to create the checkpoint table if it doesn't already exist.
-
Field Details
-
DEFAULT_EMPTY_STREAM_LIFETIME_SECS
public static final int DEFAULT_EMPTY_STREAM_LIFETIME_SECSDefault empty stream lifetime in seconds- See Also:
-
DEFAULT_STREAM_CHANGE_TIMEOUT_MS
public static final int DEFAULT_STREAM_CHANGE_TIMEOUT_MSDefault timeout in ms to change the stream, e.g, add or remove tables from stream- See Also:
-
-
Method Details
-
getCkptTableName
Gets the name of checkpoint table associated with subscription- Returns:
- the full namespace name of checkpoint table
-
getInitialPosition
Returns the initial stream position to be used when creating a Subscription. The first call toonNext()
by the Publisher willsignal
the element following this position in the stream.If stream mode is
NoSQLStreamMode.FROM_NOW
,NoSQLStreamMode.FROM_CHECKPOINT
, orNoSQLStreamMode.FROM_EXACT_CHECKPOINT
, it always returns null since these modes do not use the initial position specified in config. -
getSubscriberId
Gets the subscriber ID of the configuration.- Returns:
- subscriber ID
-
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
-
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 idshardId
- shard id- Returns:
- true if the given shard should be included in the given subscriber, false otherwise.
-
getStreamMode
Returns the start stream mode.- Returns:
- the start stream mode
-