in src/main/java/org/apache/cassandra/sidecar/YAMLSidecarConfiguration.java [163:212]
public static Configuration of(String confPath,
CassandraVersionProvider versionProvider,
String sidecarVersion,
DnsResolver dnsResolver) throws IOException
{
YAMLConfiguration yamlConf = yamlConfiguration(confPath);
int healthCheckFrequencyMillis = yamlConf.getInt(HEALTH_CHECK_INTERVAL, 1000);
ValidationConfiguration validationConfiguration = validationConfiguration(yamlConf);
InstancesConfig instancesConfig = instancesConfig(yamlConf,
versionProvider,
healthCheckFrequencyMillis,
sidecarVersion, dnsResolver);
CacheConfiguration ssTableImportCacheConfiguration = cacheConfig(yamlConf,
SSTABLE_IMPORT_CACHE_CONFIGURATION,
TimeUnit.HOURS.toMillis(2),
10_000);
WorkerPoolConfiguration serverWorkerPoolConf = workerPoolConfiguration(yamlConf,
WORKER_POOL_FOR_SERVICE,
"sidecar-worker-pool",
VertxOptions.DEFAULT_WORKER_POOL_SIZE,
TimeUnit.SECONDS.toMillis(60));
WorkerPoolConfiguration internalWorkerPoolConf = workerPoolConfiguration(yamlConf,
WORKER_POOL_FOR_INTERNAL,
"sidecar-internal-worker-pool",
VertxOptions.DEFAULT_WORKER_POOL_SIZE,
TimeUnit.SECONDS.toMillis(60));
return new YAMLSidecarConfiguration(instancesConfig,
yamlConf.get(String.class, HOST),
yamlConf.get(Integer.class, PORT),
healthCheckFrequencyMillis,
yamlConf.get(Boolean.class, SSL_ENABLED, false),
yamlConf.get(String.class, KEYSTORE_PATH, null),
yamlConf.get(String.class, KEYSTORE_PASSWORD, null),
yamlConf.get(String.class, TRUSTSTORE_PATH, null),
yamlConf.get(String.class, TRUSTSTORE_PASSWORD, null),
yamlConf.getLong(STREAM_REQUESTS_PER_SEC, 5000L),
yamlConf.getLong(THROTTLE_TIMEOUT_SEC, 10),
yamlConf.getLong(THROTTLE_DELAY_SEC, 5),
yamlConf.getInt(ALLOWABLE_SKEW_IN_MINUTES, 60),
yamlConf.getInt(REQUEST_IDLE_TIMEOUT_MILLIS, 300_000),
yamlConf.getLong(REQUEST_TIMEOUT_MILLIS, 300_000L),
yamlConf.getFloat(MIN_FREE_SPACE_PERCENT_FOR_UPLOAD, 10),
yamlConf.getInt(CONCURRENT_UPLOAD_LIMIT, 80),
yamlConf.getInt(SSTABLE_IMPORT_POLL_INTERVAL_MILLIS, 100),
validationConfiguration,
ssTableImportCacheConfiguration,
serverWorkerPoolConf,
internalWorkerPoolConf);
}