use of com.palantir.atlasdb.sweep.queue.SpecialTimestampsSupplier in project atlasdb by palantir.
the class AtlasDbEteServer method initializeAndGet.
private TargetedSweeper initializeAndGet(TargetedSweeper sweeper, TransactionManager txManager) {
// Intentionally providing the immutable timestamp instead of unreadable to avoid the delay
sweeper.initializeWithoutRunning(new SpecialTimestampsSupplier(txManager::getImmutableTimestamp, txManager::getImmutableTimestamp), txManager.getTimelockService(), txManager.getKeyValueService(), TransactionServices.createRaw(txManager.getKeyValueService(), txManager.getTimestampService(), false), new TargetedSweepFollower(ImmutableList.of(FOLLOWER), txManager));
sweeper.runInBackground();
return sweeper;
}
use of com.palantir.atlasdb.sweep.queue.SpecialTimestampsSupplier in project atlasdb by palantir.
the class AtlasDbTestCase method setUp.
@Before
public void setUp() throws Exception {
lockClient = LockClient.of(CLIENT);
lockService = inMemoryTimeLockRule.getLockService();
timelockService = inMemoryTimeLockRule.getLegacyTimelockService();
timestampService = inMemoryTimeLockRule.getTimestampService();
keyValueService = trackingKeyValueService(getBaseKeyValueService());
TransactionTables.createTables(keyValueService);
transactionService = spy(TransactionServices.createRaw(keyValueService, timestampService, false));
conflictDetectionManager = ConflictDetectionManagers.createWithoutWarmingCache(keyValueService);
sweepStrategyManager = SweepStrategyManagers.createDefault(keyValueService);
sweepQueue = spy(TargetedSweeper.createUninitializedForTest(() -> sweepQueueShards));
setUpTransactionManagers();
sweepQueue.initialize(serializableTxManager);
sweepTimestampSupplier = new SpecialTimestampsSupplier(() -> txManager.getUnreadableTimestamp(), () -> txManager.getImmutableTimestamp());
}
Aggregations