use of com.palantir.atlasdb.sweep.queue.config.TargetedSweepRuntimeConfig in project atlasdb by palantir.
the class TargetedSweeperTest method createAndInitializeSweepersAndWaitForOneBackgroundIteration.
private void createAndInitializeSweepersAndWaitForOneBackgroundIteration(int sweepers, int shards, int threads, TimelockService stickyLockService) throws InterruptedException {
TargetedSweepRuntimeConfig runtime = ImmutableTargetedSweepRuntimeConfig.builder().shards(shards).pauseMillis(5000).build();
TargetedSweepInstallConfig install = ImmutableTargetedSweepInstallConfig.builder().conservativeThreads(threads).thoroughThreads(0).build();
for (int i = 0; i < sweepers; i++) {
TargetedSweeper sweeperInstance = TargetedSweeper.createUninitialized(metricsManager, () -> runtime, install, ImmutableList.of());
sweeperInstance.initializeWithoutRunning(timestampsSupplier, stickyLockService, spiedKvs, txnService, mockFollower);
sweeperInstance.runInBackground();
}
waitUntilSweepRunsOneIteration();
}
Aggregations