Interface Refresher

All Known Implementing Classes:
AbstractRefresher, CarrierRefresher, HttpRefresher

public interface Refresher
A Refresher keeps bucket configs up to date. The refresher is the companion behavior to the loader. The loader does the initial loading and the refresher does its best to keep the ConfigurationProvider informed with an up-to-date configuration for a bucket.
Since:
1.0
Author:
Michael Nitschinger
  • Method Details

    • configs

      rx.Observable<ProposedBucketConfigContext> configs()
      Returns the Observable which will push out new configuration updates.
      Returns:
      the config observable.
    • registerBucket

      @Deprecated rx.Observable<Boolean> registerBucket​(String name, String password)
      Deprecated.
      Registers a bucket to be watched for new configurations.
      Returns:
      true if it succeeded, a failing Observable otherwise with the cause.
    • registerBucket

      rx.Observable<Boolean> registerBucket​(String name, String username, String password)
      Registers a bucket to be watched for new configurations.
      Returns:
      true if it succeeded, a failing Observable otherwise with the cause.
    • deregisterBucket

      rx.Observable<Boolean> deregisterBucket​(String name)
      De-registers a bucket from watching.
      Returns:
      true if succeeded, a failing Observable otherwise with the cause.
    • shutdown

      rx.Observable<Boolean> shutdown()
      Shuts down all open registration streams.
      Returns:
      true if succeeded, a failing Observable otherwise with the cause.
    • markTainted

      void markTainted​(BucketConfig config)
      Marks the given bucket as tainted.
      Parameters:
      config - the config of the bucket that should be marked.
    • markUntainted

      void markUntainted​(BucketConfig config)
      Mark the given bucket as not tainted.
      Parameters:
      config - the config of the bucket that should not be marked anymore.
    • refresh

      void refresh​(ClusterConfig config)
      If pull based, refresh configs for registered buckets.
    • provider

      void provider​(ConfigurationProvider provider)