public abstract class AbstractRefresher extends java.lang.Object implements Refresher
Common implementation for all refreshers.
Modifier | Constructor and Description |
---|---|
protected |
AbstractRefresher(ClusterFacade cluster)
Creates a new
AbstractRefresher . |
Modifier and Type | Method and Description |
---|---|
protected ClusterFacade |
cluster()
Returns the cluster reference.
|
rx.Observable<BucketConfig> |
configs()
Returns the
Observable which will push out new configuration updates. |
rx.Observable<java.lang.Boolean> |
deregisterBucket(java.lang.String name)
De-registers a bucket from watching.
|
protected ConfigurationProvider |
provider() |
void |
provider(ConfigurationProvider provider) |
protected void |
pushConfig(java.lang.String config)
Push a
BucketConfig into the config stream. |
rx.Observable<java.lang.Boolean> |
registerBucket(java.lang.String name,
java.lang.String password)
Registers a bucket to be watched for new configurations.
|
protected java.util.Map<java.lang.String,java.lang.String> |
registrations() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
markTainted, markUntainted, refresh, shutdown
protected AbstractRefresher(ClusterFacade cluster)
Creates a new AbstractRefresher
.
cluster
- the cluster reference.public rx.Observable<java.lang.Boolean> deregisterBucket(java.lang.String name)
Refresher
De-registers a bucket from watching.
deregisterBucket
in interface Refresher
Observable
otherwise with the cause.public rx.Observable<java.lang.Boolean> registerBucket(java.lang.String name, java.lang.String password)
Refresher
Registers a bucket to be watched for new configurations.
registerBucket
in interface Refresher
Observable
otherwise with the cause.public rx.Observable<BucketConfig> configs()
Refresher
Returns the Observable
which will push out new configuration updates.
protected void pushConfig(java.lang.String config)
Push a BucketConfig
into the config stream.
config
- the config to push.protected ClusterFacade cluster()
Returns the cluster reference.
protected ConfigurationProvider provider()
protected java.util.Map<java.lang.String,java.lang.String> registrations()
public void provider(ConfigurationProvider provider)