|
38 | 38 | public class RedisClientRecorder {
|
39 | 39 |
|
40 | 40 | // Split client and DS recorders
|
41 |
| - private final RedisConfig config; |
| 41 | + private final RuntimeValue<RedisConfig> config; |
42 | 42 | private static final Map<String, RedisClientAndApi> clients = new HashMap<>();
|
43 | 43 | private static final Map<String, ReactiveRedisDataSourceImpl> dataSources = new HashMap<>();
|
44 | 44 | private Vertx vertx;
|
45 | 45 | private ObservableRedisMetrics metrics;
|
46 | 46 |
|
47 |
| - public RedisClientRecorder(RedisConfig rc) { |
| 47 | + public RedisClientRecorder(RuntimeValue<RedisConfig> rc) { |
48 | 48 | this.config = rc;
|
49 | 49 | }
|
50 | 50 |
|
@@ -78,7 +78,7 @@ public void _initialize(io.vertx.core.Vertx vertx, Set<String> names, TlsConfigu
|
78 | 78 | // - if default -> Default
|
79 | 79 | // - if named -> Look for that config
|
80 | 80 | // - if not found -> ConfigurationException
|
81 |
| - Optional<RedisClientConfig> maybe = getConfigForName(config, name); |
| 81 | + Optional<RedisClientConfig> maybe = getConfigForName(config.getValue(), name); |
82 | 82 | if (!RedisConfig.isDefaultClient(name)) {
|
83 | 83 | RedisClientConfig actualConfig = maybe
|
84 | 84 | .orElseThrow(new Supplier<ConfigurationException>() {
|
@@ -195,9 +195,9 @@ public RedisClient get() {
|
195 | 195 | private Duration getTimeoutForClient(String name) {
|
196 | 196 | Duration timeout;
|
197 | 197 | if (RedisConfig.isDefaultClient(name)) {
|
198 |
| - timeout = config.defaultRedisClient().timeout(); |
| 198 | + timeout = config.getValue().defaultRedisClient().timeout(); |
199 | 199 | } else {
|
200 |
| - timeout = config.namedRedisClients().get(name).timeout(); |
| 200 | + timeout = config.getValue().namedRedisClients().get(name).timeout(); |
201 | 201 | }
|
202 | 202 | return timeout;
|
203 | 203 | }
|
|
0 commit comments