Package oracle.kv.pubsub
Class NoSQLPublisherConfig.Builder
java.lang.Object
oracle.kv.pubsub.NoSQLPublisherConfig.Builder
- Enclosing class:
- NoSQLPublisherConfig
Builder to help construct a NoSQLPublisherConfig instance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a NoSQLSubscriptionConfig instance from buildersetAllowPreexistDir
(boolean allow) Sets if pre-exist directory is allowedsetMaxConcurrentSubs
(int maxConcurrentSubs) Sets maximum concurrently running subscriptions in publishersetPublisherId
(String publisherId) Sets the publisher idsetReauthHandler
(ReauthenticateHandler reauthHandler) Sets reauthentication handler.setShardTimeoutMs
(long shardTimeoutMs) Sets shard timeout in milliseconds.
-
Constructor Details
-
Builder
Creates a publisher configuration with following default parameter values:- Parameters:
kvStoreConfig
- kvstore configurationrootPath
- path to the publisher root directory- Throws:
IllegalArgumentException
- if missing or invalid parameters
-
-
Method Details
-
build
Builds a NoSQLSubscriptionConfig instance from builder- Returns:
- a NoSQLSubscriptionConfig instance
-
setReauthHandler
Sets reauthentication handler. If null, the default login handler will be used.- Parameters:
reauthHandler
- reauthentication handler- Returns:
- this instance
-
setMaxConcurrentSubs
public NoSQLPublisherConfig.Builder setMaxConcurrentSubs(int maxConcurrentSubs) throws IllegalArgumentException Sets maximum concurrently running subscriptions in publisher- Parameters:
maxConcurrentSubs
- maximum concurrently running subscriptions- Returns:
- this instance
- Throws:
IllegalArgumentException
- if maximum concurrently running subscriptions is smaller than 1.
-
setShardTimeoutMs
public NoSQLPublisherConfig.Builder setShardTimeoutMs(long shardTimeoutMs) throws IllegalArgumentException Sets shard timeout in milliseconds. No shard timeout if set to 0.- Parameters:
shardTimeoutMs
- shard timeout in milliseconds- Returns:
- this instance
- Throws:
IllegalArgumentException
- if shard timeout is smaller than 0.
-
setAllowPreexistDir
Sets if pre-exist directory is allowed- Parameters:
allow
- true if pre-exist directory is allowed- Returns:
- this instance
-
setPublisherId
Sets the publisher id- Parameters:
publisherId
- publisher id- Returns:
- this instance
-