Package oracle.kv.pubsub
Class NoSQLPublisherConfig.Builder
- java.lang.Object
-
- oracle.kv.pubsub.NoSQLPublisherConfig.Builder
-
- Enclosing class:
- NoSQLPublisherConfig
public static class NoSQLPublisherConfig.Builder extends Object
Builder to help construct a NoSQLPublisherConfig instance
-
-
Constructor Summary
Constructors Constructor Description Builder(KVStoreConfig kvStoreConfig, String rootPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NoSQLPublisherConfig
build()
Builds a NoSQLSubscriptionConfig instance from builderNoSQLPublisherConfig.Builder
setAllowPreexistDir(boolean allow)
Sets if pre-exist directory is allowedNoSQLPublisherConfig.Builder
setMaxConcurrentSubs(int maxConcurrentSubs)
Sets maximum concurrently running subscriptions in publisherNoSQLPublisherConfig.Builder
setPublisherId(String publisherId)
Sets the publisher idNoSQLPublisherConfig.Builder
setReauthHandler(ReauthenticateHandler reauthHandler)
Sets reauthentication handler.NoSQLPublisherConfig.Builder
setShardTimeoutMs(long shardTimeoutMs)
Sets shard timeout in milliseconds.
-
-
-
Constructor Detail
-
Builder
public Builder(KVStoreConfig kvStoreConfig, String rootPath) throws IllegalArgumentException
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 Detail
-
build
public NoSQLPublisherConfig build()
Builds a NoSQLSubscriptionConfig instance from builder- Returns:
- a NoSQLSubscriptionConfig instance
-
setReauthHandler
public NoSQLPublisherConfig.Builder setReauthHandler(ReauthenticateHandler reauthHandler)
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
public NoSQLPublisherConfig.Builder setAllowPreexistDir(boolean allow)
Sets if pre-exist directory is allowed- Parameters:
allow
- true if pre-exist directory is allowed- Returns:
- this instance
-
setPublisherId
public NoSQLPublisherConfig.Builder setPublisherId(String publisherId)
Sets the publisher id- Parameters:
publisherId
- publisher id- Returns:
- this instance
-
-