Class KeyValueRefresher
- java.lang.Object
-
- com.couchbase.client.core.config.refresher.KeyValueRefresher
-
- All Implemented Interfaces:
Refresher
@Internal public class KeyValueRefresher extends Object implements Refresher
TheKeyValueRefresher
keeps configs up-to-date through the KV service.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description KeyValueRefresher(ConfigurationProvider provider, Core core)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Flux<ProposedBucketConfigContext>
configs()
Whenever a new config is loaded, it is pushed through this stream to be consumed.Mono<Void>
deregister(String name)
Deregisters a bucket from refreshing (stopping the refresh).void
markTainted(String name)
Marks the bucket as tainted, which will change the behavior of the refresher.void
markUntainted(String name)
Marks the bucket as untainted, which will change the behavior of the refresher.Mono<Void>
register(String name)
Registers a bucket for refreshing.Mono<Void>
shutdown()
Permanently shuts down the refresher.
-
-
-
Constructor Detail
-
KeyValueRefresher
public KeyValueRefresher(ConfigurationProvider provider, Core core)
-
-
Method Detail
-
configs
public Flux<ProposedBucketConfigContext> configs()
Description copied from interface:Refresher
Whenever a new config is loaded, it is pushed through this stream to be consumed.
-
register
public Mono<Void> register(String name)
Description copied from interface:Refresher
Registers a bucket for refreshing.
-
deregister
public Mono<Void> deregister(String name)
Description copied from interface:Refresher
Deregisters a bucket from refreshing (stopping the refresh).- Specified by:
deregister
in interfaceRefresher
- Parameters:
name
- the name of the bucket.- Returns:
- a
Mono
once complete.
-
markTainted
public void markTainted(String name)
Description copied from interface:Refresher
Marks the bucket as tainted, which will change the behavior of the refresher.A config is marked as tainted during rebalance, which usually leads to shorter intervals of checking if a new configuration exists (depending of the refresher impl).
- Specified by:
markTainted
in interfaceRefresher
- Parameters:
name
- the name of the bucket.
-
markUntainted
public void markUntainted(String name)
Description copied from interface:Refresher
Marks the bucket as untainted, which will change the behavior of the refresher.A config is marked as tainted during rebalance, which usually leads to shorter intervals of checking if a new configuration exists (depending of the refresher impl).
- Specified by:
markUntainted
in interfaceRefresher
- Parameters:
name
- the name of the bucket.
-
-