@Test public void ifRuntimeConfigIsModified_reloadableConfigIsAlsoModified() { CassandraReloadableKvsConfig reloadableConfig = getReloadableConfigWithRuntimeConfig(); int firstValue = 1; int secondValue = 2; when(runtimeConfig.sweepReadThreads()).thenReturn(firstValue, secondValue); assertThat(reloadableConfig.sweepReadThreads(), is(firstValue)); assertThat(reloadableConfig.sweepReadThreads(), is(secondValue)); }
@Override public Integer sweepReadThreads() { return chooseConfig(CassandraKeyValueServiceRuntimeConfig::sweepReadThreads, config.sweepReadThreads()); }
CassandraReloadableKvsConfig implements CassandraKeyValueServiceConfig { @Override public Integer sweepReadThreads() { return chooseConfig(CassandraKeyValueServiceRuntimeConfig::sweepReadThreads, config.sweepReadThreads()); } }
CassandraReloadableKvsConfig implements CassandraKeyValueServiceConfig { @Override public Integer sweepReadThreads() { return chooseConfig(CassandraKeyValueServiceRuntimeConfig::sweepReadThreads, config.sweepReadThreads()); } CassandraReloadableKvsConfig(CassandraKeyValueServiceConfig config,
            Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig); }
CassandraReloadableKvsConfig implements CassandraKeyValueServiceConfig { @Override public Integer sweepReadThreads() { return chooseConfig(CassandraKeyValueServiceRuntimeConfig::sweepReadThreads, config.sweepReadThreads()); } CassandraReloadableKvsConfig(CassandraKeyValueServiceConfig config,
            Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig); @Override CassandraServersConfigs.CassandraServersConfig servers(); @Override Map<String, InetSocketAddress> addressTranslation(); @Override Optional<String> namespace(); @Override int poolSize(); @Override int maxConnectionBurstSize(); @Override double proportionConnectionsToCheckPerEvictionRun(); @Override int idleConnectionTimeoutSeconds(); @Override int timeBetweenConnectionEvictionRunsSeconds(); @Override int poolRefreshIntervalSeconds(); @Override int unresponsiveHostBackoffTimeSeconds(); @Override int gcGraceSeconds(); @Override double localHostWeighting(); @Override Optional<HostLocation> overrideHostLocation(); @Override String getKeyspaceOrThrow(); @Override Optional<String> keyspace(); @Override CassandraCredentialsConfig credentials(); @Override Optional<Boolean> ssl(); @Override Optional<SslConfiguration> sslConfiguration(); @Override CassandraAsyncKeyValueServiceFactory asyncKeyValueServiceFactory(); @Override Optional<Supplier<ExecutorService>> thriftExecutorServiceFactory(); @Override int replicationFactor(); @Override int mutationBatchCount(); @Override int mutationBatchSizeBytes(); @Override int fetchBatchCount(); @Override boolean ignoreNodeTopologyChecks(); @Override boolean ignoreInconsistentRingChecks(); @Override boolean ignoreDatacenterConfigurationChecks(); @Override boolean ignorePartitionerChecks(); @Override boolean autoRefreshNodes(); @Override boolean clusterMeetsNormalConsistencyGuarantees(); @Override int socketTimeoutMillis(); @Override int socketQueryTimeoutMillis(); @Override int cqlPoolTimeoutMillis(); @Override int schemaMutationTimeoutMillis(); @Override int rangesConcurrency(); @Override Integer timestampsGetterBatchSize(); @Override Integer sweepReadThreads(); @Override Optional<CassandraJmxCompactionConfig> jmx(); @Override String type(); @Override int concurrentGetRangesThreadPoolSize(); @Override int defaultGetRangesConcurrency(); @Override boolean usingSsl(); @Override void check(); }
CassandraReloadableKvsConfig implements CassandraKeyValueServiceConfig { @Override public Integer sweepReadThreads() { return chooseConfig(CassandraKeyValueServiceRuntimeConfig::sweepReadThreads, config.sweepReadThreads()); } CassandraReloadableKvsConfig(CassandraKeyValueServiceConfig config,
            Supplier<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig); @Override CassandraServersConfigs.CassandraServersConfig servers(); @Override Map<String, InetSocketAddress> addressTranslation(); @Override Optional<String> namespace(); @Override int poolSize(); @Override int maxConnectionBurstSize(); @Override double proportionConnectionsToCheckPerEvictionRun(); @Override int idleConnectionTimeoutSeconds(); @Override int timeBetweenConnectionEvictionRunsSeconds(); @Override int poolRefreshIntervalSeconds(); @Override int unresponsiveHostBackoffTimeSeconds(); @Override int gcGraceSeconds(); @Override double localHostWeighting(); @Override Optional<HostLocation> overrideHostLocation(); @Override String getKeyspaceOrThrow(); @Override Optional<String> keyspace(); @Override CassandraCredentialsConfig credentials(); @Override Optional<Boolean> ssl(); @Override Optional<SslConfiguration> sslConfiguration(); @Override CassandraAsyncKeyValueServiceFactory asyncKeyValueServiceFactory(); @Override Optional<Supplier<ExecutorService>> thriftExecutorServiceFactory(); @Override int replicationFactor(); @Override int mutationBatchCount(); @Override int mutationBatchSizeBytes(); @Override int fetchBatchCount(); @Override boolean ignoreNodeTopologyChecks(); @Override boolean ignoreInconsistentRingChecks(); @Override boolean ignoreDatacenterConfigurationChecks(); @Override boolean ignorePartitionerChecks(); @Override boolean autoRefreshNodes(); @Override boolean clusterMeetsNormalConsistencyGuarantees(); @Override int socketTimeoutMillis(); @Override int socketQueryTimeoutMillis(); @Override int cqlPoolTimeoutMillis(); @Override int schemaMutationTimeoutMillis(); @Override int rangesConcurrency(); @Override Integer timestampsGetterBatchSize(); @Override Integer sweepReadThreads(); @Override Optional<CassandraJmxCompactionConfig> jmx(); @Override String type(); @Override int concurrentGetRangesThreadPoolSize(); @Override int defaultGetRangesConcurrency(); @Override boolean usingSsl(); @Override void check();  }