java.lang.Object
me.ahoo.cosid.store.StoreConfig.Builder
- Enclosing class:
StoreConfig
Builds a
StoreConfig; build() checks the fields.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the config.Sets an existing connection object; the provider does not close it.Sets a backend option.Sets backend options, keeping those set before under other keys.Sets the operation timeout, enforced by the backend's own mechanism.
-
Method Details
-
timeout
Sets the operation timeout, enforced by the backend's own mechanism.- Parameters:
timeout- the timeout, positive; defaultStoreConfig.DEFAULT_TIMEOUT- Returns:
- this builder
-
option
Sets a backend option.- Parameters:
key- the option keyvalue- the value- Returns:
- this builder
-
options
Sets backend options, keeping those set before under other keys.- Parameters:
options- the options- Returns:
- this builder
-
client
Sets an existing connection object; the provider does not close it.- Parameters:
client- the client; by default the provider creates its own from the options and closes it- Returns:
- this builder
-
build
Builds the config.- Returns:
- the config
- Throws:
IllegalArgumentException- if the timeout is not positive
-