public interface ConfigurationProvider
Modifier and Type | Method and Description |
---|---|
rx.Observable<ClusterConfig> |
closeBucket(String name) |
rx.Observable<Boolean> |
closeBuckets() |
ClusterConfig |
config()
Returns the current config or null if not set.
|
rx.Observable<ClusterConfig> |
configs()
Returns an
Observable , which pushes a new ClusterConfig once available. |
rx.Observable<ClusterConfig> |
openBucket(String name,
String password)
Start to fetch a config for the given bucket and also watch for changes, depending on the mechanism used.
|
rx.Observable<ClusterConfig> |
openBucket(String name,
String username,
String password)
Start to fetch a config for the given bucket and also watch for changes, depending on the mechanism used.
|
void |
proposeBucketConfig(String bucket,
String config) |
boolean |
seedHosts(Set<NetworkAddress> hosts,
boolean shuffle)
Set the initial seed hosts for bootstrap.
|
rx.Observable<Boolean> |
shutdown()
Shutdown the
ConfigurationProvider into a terminal state where it cannot be used anymore and all its non-bucket resources are freed. |
void |
signalOutdated() |
rx.Observable<ClusterConfig> configs()
Returns an Observable
, which pushes a new ClusterConfig
once available.
ClusterConfig config()
Returns the current config or null if not set.
boolean seedHosts(Set<NetworkAddress> hosts, boolean shuffle)
Set the initial seed hosts for bootstrap.
This should only be done as long as the ConfigurationProvider
is not bootstrapped, otherwise it might be ignored.
hosts
- list of seed hosts.shuffle
- shuffle seed host list.rx.Observable<ClusterConfig> openBucket(String name, String password)
Start to fetch a config for the given bucket and also watch for changes, depending on the mechanism used.
name
- the name of the bucket.password
- the name of the password.rx.Observable<ClusterConfig> openBucket(String name, String username, String password)
Start to fetch a config for the given bucket and also watch for changes, depending on the mechanism used.
name
- the name of the bucket.username
- the user authorized for bucket access.password
- the password of the user.rx.Observable<ClusterConfig> closeBucket(String name)
rx.Observable<Boolean> closeBuckets()
rx.Observable<Boolean> shutdown()
Shutdown the ConfigurationProvider
into a terminal state where it cannot be used anymore and all its non-bucket resources are freed.
void signalOutdated()
Copyright © 2017 Couchbase, Inc.. All rights reserved.