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
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_EMPTY_STREAM_LIFETIME_SECS
Default empty stream lifetime in secondsstatic int
DEFAULT_STREAM_CHANGE_TIMEOUT_MS
Default timeout in ms to change the stream, e.g, add or remove tables from stream
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCkptTableName()
Gets the name of checkpoint table associated with subscriptionint
getEmptyStreamSecs()
Returns the lifetime in seconds of empty subscription.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.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.
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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 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
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
-
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
public NoSQLStreamMode getStreamMode()
Returns the start stream mode.- Returns:
- the start stream mode
-
-