public class TimestampChooser extends Object implements IRowStoreConstants
SparseRowStore
on the
server.AUTO_TIMESTAMP, AUTO_TIMESTAMP_UNIQUE, CURRENT_ROW, MAX_TIMESTAMP, MIN_TIMESTAMP
Constructor and Description |
---|
TimestampChooser() |
Modifier and Type | Method and Description |
---|---|
static long |
chooseTimestamp(IIndex ndx,
long timestamp)
Choose the timestamp for
TPS.TPV tuples to written on the sparse row
store. |
public static long chooseTimestamp(IIndex ndx, long timestamp)
TPS.TPV
tuples to written on the sparse row
store.
Note: Revisions written with the same timestamp as a pre-existing column value will overwrite the existing column value rather than causing new revisions with their own distinct timestamp to be written. There is therefore a choice for "auto" vs "auto-unique" for timestamps.
Note: Timestamps generated locally on the server will be consistent
within a row, and all revisions of column values for the same row will
always be in the same index partition and hence on the same server. This
means that we can use locally assigned timestamp as unique timestamps.
However, time could go backwards if there is a failover to another server
for the partition and the other server has a different clock time. This
is resolved by choosing a timestamp assigned by the global
ITimestampService
.
timestamp
- When timestamp> is IRowStoreConstants.AUTO_TIMESTAMP
the timestamp is the local system time. When timestamp
is IRowStoreConstants.AUTO_TIMESTAMP_UNIQUE
a federation
wide unique timestamp is assigned by the
ITimestampService
. Otherwise the caller's
timestamp is returned.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.