Package com.palantir.atlasdb.cassandra
Interface CassandraMutationTimestampProvider
-
public interface CassandraMutationTimestampProvider
This interface produces Cassandra timestamps for mutations, where it makes sense for these to be overridden. The values returned by this provider must observe the following semantics. - Sweep sentinels: These must be strictly greater than the Cassandra timestamps of any previous deletions or range tombstones covering the sweep sentinel. (We may want to write sweep sentinels to a table where deletions or range tombstones already exist, in the case of tables shifting between THOROUGH to CONSERVATIVE sweep.) - Deletions: These must be strictly greater than the Cassandra timestamp at which the original value being deleted was written. - Range tombstones: These must be strictly greater than the Cassandra timestamps of all values covered by the range tombstone (including sweep sentinels, if applicable.) In addition to the above semantics, these values should increase over time and should largely be in line with AtlasDB's notion of logical time, to ensure smooth compaction of tables.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LongUnaryOperator
getDeletionTimestampOperatorForBatchDelete()
Returns an operator, which determines the Cassandra timestamp to write a delete at, given the Atlas timestamp at which the deletion occurred.long
getRangeTombstoneTimestamp(long maximumAtlasTimestampExclusive)
Cassandra timestamp at which a range tombstone should be written.long
getRemoveTimestamp()
Returns the Cassandra timestamp at which whole row deletes should be performed.long
getSweepSentinelWriteTimestamp()
Returns the Cassandra timestamp at which sweep sentinels should be written.
-
-
-
Method Detail
-
getSweepSentinelWriteTimestamp
long getSweepSentinelWriteTimestamp()
Returns the Cassandra timestamp at which sweep sentinels should be written. This is called once per API call to CassandraKeyValueServiceImpl.addGarbageCollectionSentinelValues().
-
getRemoveTimestamp
long getRemoveTimestamp()
Returns the Cassandra timestamp at which whole row deletes should be performed.
-
getDeletionTimestampOperatorForBatchDelete
LongUnaryOperator getDeletionTimestampOperatorForBatchDelete()
Returns an operator, which determines the Cassandra timestamp to write a delete at, given the Atlas timestamp at which the deletion occurred. The operator is intended to be use for a single batch deletion, and must not be re-used outside of the context of a single batch delete. The operator is obtained once per API call to CassandraKeyValueServiceImpl.delete(). The operator is invoked once per cell involved in such an API call, and thus must be cheap to invoke.
-
getRangeTombstoneTimestamp
long getRangeTombstoneTimestamp(long maximumAtlasTimestampExclusive)
Cassandra timestamp at which a range tombstone should be written.- Parameters:
maximumAtlasTimestampExclusive
- Maximum timestamp, exclusive, of the range tombstone. This is called once per API call to CassandraKeyValueServiceImpl.deleteAllTimestamps().
-
-