Class KeyValueBucketLoader

All Implemented Interfaces:

public class KeyValueBucketLoader extends BaseBucketLoader
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.

  • Constructor Details

    • KeyValueBucketLoader

      public KeyValueBucketLoader(Core core)
  • Method Details

    • discoverConfig

      protected Mono<byte[]> discoverConfig(NodeIdentifier seed, String bucket)
      Description copied from class: BaseBucketLoader
      To be implemented by the actual child, performs the actual fetching of a config.
      Specified by:
      discoverConfig in class BaseBucketLoader
      seed - the node from where to fetch it.
      bucket - the name of the bucket to fetch from.
      the encoded json version of the config if complete, an error otherwise.