Search in sources :

Example 6 with TimestampBoundStore

use of com.palantir.timestamp.TimestampBoundStore in project atlasdb by palantir.

the class CassandraTimestampStoreInvalidatorIntegrationTest method assertWeCanReadTimestamp.

private void assertWeCanReadTimestamp(long expectedTimestamp) {
    TimestampBoundStore timestampBoundStore = CassandraTimestampBoundStore.create(kv);
    assertThat(timestampBoundStore.getUpperLimit()).isEqualTo(expectedTimestamp);
}
Also used : TimestampBoundStore(com.palantir.timestamp.TimestampBoundStore)

Example 7 with TimestampBoundStore

use of com.palantir.timestamp.TimestampBoundStore in project atlasdb by palantir.

the class CassandraTimestampStoreInvalidatorIntegrationTest method getBoundAfterTakingOutOneMillionTimestamps.

private long getBoundAfterTakingOutOneMillionTimestamps() {
    TimestampBoundStore timestampBoundStore = CassandraTimestampBoundStore.create(kv);
    long newLimit = timestampBoundStore.getUpperLimit() + ONE_MILLION;
    timestampBoundStore.storeUpperLimit(newLimit);
    return newLimit;
}
Also used : TimestampBoundStore(com.palantir.timestamp.TimestampBoundStore)

Aggregations

TimestampBoundStore (com.palantir.timestamp.TimestampBoundStore)7 Test (org.junit.Test)4 DelegatingManagedTimestampService (com.palantir.atlasdb.timelock.paxos.DelegatingManagedTimestampService)1 PaxosTimestampBoundStore (com.palantir.atlasdb.timelock.paxos.PaxosTimestampBoundStore)1 MultipleRunningTimestampServiceError (com.palantir.timestamp.MultipleRunningTimestampServiceError)1 PersistentTimestampService (com.palantir.timestamp.PersistentTimestampService)1