Class ClusterManagerBucketLoader
- All Implemented Interfaces:
BucketLoader
While one might think always going to the cluster manager is the best option, there is a
reason why this loader is only a fallback to the KeyValueBucketLoader
. At scale, talking to
KV engine for a config is much more efficient than talking to the cluster manager. But there
are times where the carrier loader cannot do its job and then this fallback is a safe
alternative.
Side note for folks coming from the 1.x core: since we've stopped supporting anything older than 5.0.0 on the server, there is no need for the verbose fallback anymore, since every supported version supports the terse http config path.
In 1.x this used to be called the "HttpLoader", but the new name more accurately reflects where it is getting the config from 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
-
ClusterManagerBucketLoader
-
-
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.
-