use of com.palantir.atlasdb.keyvalue.dbkvs.impl.postgres.PostgresPrefixedTableNames in project atlasdb by palantir.
the class DbKvs method createPostgres.
private static DbKvs createPostgres(ExecutorService executor, PostgresDdlConfig config, SqlConnectionSupplier connections) {
PostgresPrefixedTableNames prefixedTableNames = new PostgresPrefixedTableNames(config);
DbTableFactory tableFactory = new PostgresDbTableFactory(config, prefixedTableNames);
TableMetadataCache tableMetadataCache = new TableMetadataCache(tableFactory);
CellTsPairLoader cellTsPairLoader = new PostgresCellTsPageLoader(prefixedTableNames, connections);
return new DbKvs(executor, config, tableFactory, connections, new ParallelTaskRunner(newFixedThreadPool(config.poolSize()), config.fetchBatchSize()), // no overflow on postgres
(conns, tbl, ids) -> Collections.emptyMap(), new PostgresGetRange(prefixedTableNames, connections, tableMetadataCache), new DbKvsGetCandidateCellsForSweeping(cellTsPairLoader));
}
Aggregations