Class KeyValueBucketLoader
java.lang.Object
com.couchbase.client.core.config.loader.BaseBucketLoader
com.couchbase.client.core.config.loader.KeyValueBucketLoader
- All Implemented Interfaces:
BucketLoader
This loader is responsible for initially loading a configuration through the kv protocol.
The main and primary mechanism to bootstrap a good configuration is through the kv protocol with a special command, since those connections need to be open anyways and it is more efficient at large scale than the cluster manager (who is the authority).
Note that this loader can fail (hence the ClusterManagerBucketLoader
as a backup), either because
the current seed node does not have the data service enabled or it is a memcached bucket which
does not support the special command.
In 1.x this loader used to be called Carrier BucketLoader (from CCCP "couchbase carrier config publication"), but the new name more accurately reflects from which service it is loading it rather than how.
- Since:
- 1.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Mono<byte[]>
discoverConfig
(NodeIdentifier seed, String bucket) To be implemented by the actual child, performs the actual fetching of a config.Methods inherited from class com.couchbase.client.core.config.loader.BaseBucketLoader
core, load
-
Constructor Details
-
KeyValueBucketLoader
-
-
Method Details
-
discoverConfig
Description copied from class:BaseBucketLoader
To be implemented by the actual child, performs the actual fetching of a config.- Specified by:
discoverConfig
in classBaseBucketLoader
- Parameters:
seed
- the node from where to fetch it.bucket
- the name of the bucket to fetch from.- Returns:
- the encoded json version of the config if complete, an error otherwise.
-