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)`
  Creates a publisher configuration with following default parameter values: Shard timeout in milliseconds: 600000L Maximum number of subscriptions: 32 Null login credentials Null reauthenticate handler

- ## Method Summary

  Modifier and Type
  Method
  Description
  `NoSQLPublisherConfig`
  `build()`
  Builds a NoSQLSubscriptionConfig instance from builder
  `NoSQLPublisherConfig.Builder`
  `setAllowPreexistDir(boolean allow)`
  Sets if pre-exist directory is allowed
  `NoSQLPublisherConfig.Builder`
  `setMaxConcurrentSubs(int maxConcurrentSubs)`
  Sets maximum concurrently running subscriptions in publisher
  `NoSQLPublisherConfig.Builder`
  `setPublisherId(String publisherId)`
  Sets the publisher id
  `NoSQLPublisherConfig.Builder`
  `setReauthHandler(ReauthenticateHandler reauthHandler)`
  Sets reauthentication handler.
  `NoSQLPublisherConfig.Builder`
  `setShardTimeoutMs(long shardTimeoutMs)`
  Sets shard timeout in milliseconds.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder(KVStoreConfig kvStoreConfig, String rootPath) throws IllegalArgumentException
    Creates a publisher configuration with following default parameter values:
    - Shard timeout in milliseconds: 600000L
    - Maximum number of subscriptions: 32
    - Null login credentials
    - Null reauthenticate handler
    Parameters:
      `kvStoreConfig` - kvstore configuration
      `rootPath` - path to the publisher root directory
    Throws:
      `IllegalArgumentException` - if missing or invalid parameters

- ## Method Details

  - ### 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