Package com.datastax.driver.core
Interface TimestampGenerator
-
- All Known Implementing Classes:
AbstractMonotonicTimestampGenerator,AtomicMonotonicTimestampGenerator,LoggingMonotonicTimestampGenerator,ServerSideTimestampGenerator,ThreadLocalMonotonicTimestampGenerator
public interface TimestampGeneratorGenerates client-side, microsecond-precision query timestamps.Given that Cassandra uses those timestamps to resolve conflicts, implementations should generate monotonically increasing timestamps for successive invocations of
next().
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longnext()Returns the next timestamp.
-
-
-
Method Detail
-
next
long next()
Returns the next timestamp.Implementors should enforce increasing monotonicity of timestamps, that is, a timestamp returned should always be strictly greater that any previously returned timestamp.
Implementors should strive to achieve microsecond precision in the best possible way, which is usually largely dependent on the underlying operating system's capabilities.
- Returns:
- the next timestamp (in microseconds). If it equals
Long.MIN_VALUE, it won't be sent by the driver, letting Cassandra generate a server-side timestamp.
-
-