Interface ConfigurationProvider

    • Method Detail

      • configs

        rx.Observable<ClusterConfig> configs()
        Returns an Observable, which pushes a new ClusterConfig once available.
        Returns:
        the configuration.
      • config

        ClusterConfig config()
        Returns the current config or null if not set.
        Returns:
        returns the current cluster config.
      • seedHosts

        boolean seedHosts​(Set<String> 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.
        Parameters:
        hosts - list of seed hosts.
        shuffle - shuffle seed host list.
        Returns:
        true if host list updated, false otherwise.
      • openBucket

        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.
        Parameters:
        name - the name of the bucket.
        password - the name of the password.
        Returns:
        an observable with the configuration if success, and failures otherwise.
      • openBucket

        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.
        Parameters:
        name - the name of the bucket.
        username - the user authorized for bucket access.
        password - the password of the user.
        Returns:
        an observable with the configuration if success, and failures otherwise.
      • closeBuckets

        rx.Observable<Boolean> closeBuckets()
      • shutdown

        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.
      • proposeBucketConfig

        void proposeBucketConfig​(ProposedBucketConfigContext ctx)
        Propose a new bucket config with surrounding context.
        Parameters:
        ctx - the raw config including context.
      • signalOutdated

        void signalOutdated()