use of com.palantir.atlasdb.keyvalue.api.AsyncKeyValueService in project atlasdb by palantir.
the class CassandraKeyValueServiceImpl method createWithCqlClient.
private static CassandraKeyValueService createWithCqlClient(MetricsManager metricsManager, CassandraKeyValueServiceConfig config, Refreshable<CassandraKeyValueServiceRuntimeConfig> runtimeConfig, CassandraClientPool clientPool, CassandraMutationTimestampProvider mutationTimestampProvider, Logger log, boolean initializeAsync) {
try {
CassandraClusterConfig clusterConfig = CassandraClusterConfig.of(config, runtimeConfig.get());
AsyncKeyValueService asyncKeyValueService = config.asyncKeyValueServiceFactory().constructAsyncKeyValueService(metricsManager, config.getKeyspaceOrThrow(), clusterConfig, runtimeConfig.map(CassandraKeyValueServiceRuntimeConfig::servers), initializeAsync);
return createAndInitialize(metricsManager, config, runtimeConfig, clientPool, asyncKeyValueService, mutationTimestampProvider, log, initializeAsync);
} catch (Exception e) {
log.warn("Exception during async KVS creation.", e);
throw Throwables.unwrapAndThrowAtlasDbDependencyException(e);
}
}
Aggregations