Class AtomicMonotonicWinApiTimestampGenerator
A timestamp generator that guarantees monotonically increasing timestamps among all client threads and logs warnings when timestamps drift in the future, using Win API high precision GetSystemTimePreciseAsFileTime() method call available in Windows 8+ and Windows Server 2012+.
Implements
Inherited Members
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public class AtomicMonotonicWinApiTimestampGenerator : AtomicMonotonicTimestampGenerator, ITimestampGenerator
Constructors
AtomicMonotonicWinApiTimestampGenerator(int, int)
Creates a new instance of AtomicMonotonicTimestampGenerator.
Declaration
public AtomicMonotonicWinApiTimestampGenerator(int warningThreshold = 1000, int minLogInterval = 1000)
Parameters
Type | Name | Description |
---|---|---|
int | warningThreshold | Determines how far in the future timestamps are allowed to drift before a warning is logged, expressed
in milliseconds. Default: |
int | minLogInterval | In case of multiple log events, it determines the time separation between log events, expressed in
milliseconds. Use 0 to disable. Default: |
Exceptions
Type | Condition |
---|---|
NotSupportedException |
Methods
GetTimestamp()
Retrieves the current system-clock time in expressed microseconds since UNIX epoch.
Declaration
protected override sealed long GetTimestamp()
Returns
Type | Description |
---|---|
long |