use of com.palantir.atlasdb.cleaner.Puncher in project atlasdb by palantir.
the class TestTimestampCommand method punch.
private void punch(TestAtlasDbServices services, TimestampService tss, Clock clock) {
// this is a really hacky way of forcing a punch to test the datetime output
Uninterruptibles.sleepUninterruptibly(2, TimeUnit.MILLISECONDS);
long punchTs = tss.getFreshTimestamps(1000).getUpperBound();
PuncherStore puncherStore = KeyValueServicePuncherStore.create(services.getKeyValueService());
Puncher puncher = SimplePuncher.create(puncherStore, clock, Suppliers.ofInstance(AtlasDbConstants.DEFAULT_TRANSACTION_READ_TIMEOUT));
puncher.punch(punchTs);
Uninterruptibles.sleepUninterruptibly(2, TimeUnit.MILLISECONDS);
}
Aggregations