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()), (conns, tbl, ids) -> Collections.emptyMap(), // no overflow on postgres new PostgresGetRange(prefixedTableNames, connections, tableMetadataCache), new DbKvsGetCandidateCellsForSweeping(cellTsPairLoader)); }
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()), (conns, tbl, ids) -> Collections.emptyMap(), // no overflow on postgres new PostgresGetRange(prefixedTableNames, connections, tableMetadataCache), new DbKvsGetCandidateCellsForSweeping(cellTsPairLoader)); }