Class HttpRefresher
- java.lang.Object
-
- com.couchbase.client.core.config.refresher.AbstractRefresher
-
- com.couchbase.client.core.config.refresher.HttpRefresher
-
- All Implemented Interfaces:
Refresher
public class HttpRefresher extends AbstractRefresher
Keeps the bucket config fresh through a HTTP streaming connection.- Since:
- 1.0
- Author:
- Michael Nitschinger
-
-
Constructor Summary
Constructors Constructor Description HttpRefresher(CoreEnvironment env, ClusterFacade cluster)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
markTainted(BucketConfig config)
Marks the given bucket as tainted.void
markUntainted(BucketConfig config)
Mark the given bucket as not tainted.void
refresh(ClusterConfig config)
If pull based, refresh configs for registered buckets.rx.Observable<Boolean>
registerBucket(String name, String password)
Registers a bucket to be watched for new configurations.rx.Observable<Boolean>
registerBucket(String name, String username, String password)
Registers a bucket to be watched for new configurations.rx.Observable<Boolean>
shutdown()
Shuts down all open registration streams.-
Methods inherited from class com.couchbase.client.core.config.refresher.AbstractRefresher
cluster, configs, deregisterBucket, provider, provider, pushConfig, registrations
-
-
-
-
Constructor Detail
-
HttpRefresher
public HttpRefresher(CoreEnvironment env, ClusterFacade cluster)
-
-
Method Detail
-
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 interfaceRefresher
- Overrides:
registerBucket
in classAbstractRefresher
- 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 interfaceRefresher
- Overrides:
registerBucket
in classAbstractRefresher
- Returns:
- true if it succeeded, a failing
Observable
otherwise with the cause.
-
shutdown
public rx.Observable<Boolean> shutdown()
Description copied from interface:Refresher
Shuts down all open registration streams.- Returns:
- true if succeeded, a failing
Observable
otherwise with the cause.
-
markTainted
public void markTainted(BucketConfig config)
Description copied from interface:Refresher
Marks the given bucket as tainted.- Parameters:
config
- the config of the bucket that should be marked.
-
markUntainted
public void markUntainted(BucketConfig config)
Description copied from interface:Refresher
Mark the given bucket as not tainted.- Parameters:
config
- the config of the bucket that should not be marked anymore.
-
refresh
public void refresh(ClusterConfig config)
Description copied from interface:Refresher
If pull based, refresh configs for registered buckets.
-
-