Class AbstractRefresher

java.lang.Object
com.couchbase.client.core.config.refresher.AbstractRefresher
All Implemented Interfaces:
Refresher
Direct Known Subclasses:
CarrierRefresher, HttpRefresher

public abstract class AbstractRefresher
extends Object
implements Refresher
Common implementation for all refreshers.
Since:
1.0
Author:
Michael Nitschinger
  • Constructor Details

  • Method Details

    • deregisterBucket

      public rx.Observable<Boolean> deregisterBucket​(String name)
      Description copied from interface: Refresher
      De-registers a bucket from watching.
      Specified by:
      deregisterBucket in interface Refresher
      Returns:
      true if succeeded, a failing Observable otherwise with the cause.
    • registerBucket

      public rx.Observable<Boolean> registerBucket​(String name, String password)
      Description copied from interface: Refresher
      Registers a bucket to be watched for new configurations.
      Specified by:
      registerBucket in interface Refresher
      Returns:
      true if it succeeded, a failing Observable otherwise with the cause.
    • registerBucket

      public rx.Observable<Boolean> registerBucket​(String name, String username, String password)
      Description copied from interface: Refresher
      Registers a bucket to be watched for new configurations.
      Specified by:
      registerBucket in interface Refresher
      Returns:
      true if it succeeded, a failing Observable otherwise with the cause.
    • configs

      public rx.Observable<ProposedBucketConfigContext> configs()
      Description copied from interface: Refresher
      Returns the Observable which will push out new configuration updates.
      Specified by:
      configs in interface Refresher
      Returns:
      the config observable.
    • pushConfig

      protected void pushConfig​(ProposedBucketConfigContext ctx)
      Push a BucketConfig into the config stream.
      Parameters:
      ctx - the config context to push.
    • cluster

      protected ClusterFacade cluster()
      Returns the cluster reference.
      Returns:
      the cluster reference.
    • provider

      protected ConfigurationProvider provider()
    • provider

      public void provider​(ConfigurationProvider provider)
      Specified by:
      provider in interface Refresher
    • registrations

      protected Map<String,​com.couchbase.client.core.config.refresher.AbstractRefresher.Credential> registrations()