static SweepQueueFactory create( TargetedSweepMetrics metrics, KeyValueService kvs, TimelockService timelock, Supplier<Integer> shardsConfig, TransactionService transaction) { Schemas.createTablesAndIndexes(TargetedSweepSchema.INSTANCE.getLatestSchema(), kvs); ShardProgress shardProgress = new ShardProgress(kvs); Supplier<Integer> shards = createProgressUpdatingSupplier(shardsConfig, shardProgress, SweepQueueUtils.REFRESH_TIME); WriteInfoPartitioner partitioner = new WriteInfoPartitioner(kvs, shards); SweepableCells cells = new SweepableCells(kvs, partitioner, metrics, transaction); SweepableTimestamps timestamps = new SweepableTimestamps(kvs, partitioner); return new SweepQueueFactory(shardProgress, shards, cells, timestamps, metrics, kvs, timelock); }
/** * Creates a SweepQueueWriter, performing all the necessary initialization. */ public static MultiTableSweepQueueWriter createWriter( TargetedSweepMetrics metrics, KeyValueService kvs, TimelockService timelock, Supplier<Integer> shardsConfig) { return SweepQueueFactory.create(metrics, kvs, timelock, shardsConfig).createWriter(); }
public static SweepQueue create( TargetedSweepMetrics metrics, KeyValueService kvs, TimelockService timelock, Supplier<Integer> shardsConfig, TransactionService transaction, TargetedSweepFollower follower) { return new SweepQueue(SweepQueueFactory.create(metrics, kvs, timelock, shardsConfig, transaction), follower); }
static SweepQueueFactory create( TargetedSweepMetrics metrics, KeyValueService kvs, TimelockService timelock, Supplier<Integer> shardsConfig, TransactionService transaction) { Schemas.createTablesAndIndexes(TargetedSweepSchema.INSTANCE.getLatestSchema(), kvs); ShardProgress shardProgress = new ShardProgress(kvs); Supplier<Integer> shards = createProgressUpdatingSupplier(shardsConfig, shardProgress, SweepQueueUtils.REFRESH_TIME); WriteInfoPartitioner partitioner = new WriteInfoPartitioner(kvs, shards); SweepableCells cells = new SweepableCells(kvs, partitioner, metrics, transaction); SweepableTimestamps timestamps = new SweepableTimestamps(kvs, partitioner); return new SweepQueueFactory(shardProgress, shards, cells, timestamps, metrics, kvs, timelock); }
/** * Creates a SweepQueueWriter, performing all the necessary initialization. */ public static MultiTableSweepQueueWriter createWriter( TargetedSweepMetrics metrics, KeyValueService kvs, TimelockService timelock, Supplier<Integer> shardsConfig) { return SweepQueueFactory.create(metrics, kvs, timelock, shardsConfig).createWriter(); }
public static SweepQueue create( TargetedSweepMetrics metrics, KeyValueService kvs, TimelockService timelock, Supplier<Integer> shardsConfig, TransactionService transaction, TargetedSweepFollower follower) { return new SweepQueue(SweepQueueFactory.create(metrics, kvs, timelock, shardsConfig, transaction), follower); }