Class ClusterManagerLoader

  • All Implemented Interfaces:
    Loader

    public class ClusterManagerLoader
    extends BaseLoader
    This loader is responsible for loading a config from the cluster manager.

    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 KeyValueLoader. 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 Detail

      • ClusterManagerLoader

        public ClusterManagerLoader​(Core core)
    • Method Detail

      • discoverConfig

        protected Mono<byte[]> discoverConfig​(NodeIdentifier seed,
                                              String bucket)
        Description copied from class: BaseLoader
        To be implemented by the actual child, performs the actual fetching of a config.
        Specified by:
        discoverConfig in class BaseLoader
        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.