public class TimestampUtility extends Object
Constructor and Description |
---|
TimestampUtility() |
Modifier and Type | Method and Description |
---|---|
static long |
asHistoricalRead(long commitTime)
Accepts a commitTime and returns a timestamp that will be interpreted as
a historical read (this is a NOP).
|
static boolean |
isCommitTime(long timestamp)
True iff the timestamp is a possible commit time (GT ZERO).
|
static boolean |
isReadCommitted(long timestamp) |
static boolean |
isReadCommittedOrUnisolated(long timestamp) |
static boolean |
isReadOnly(long timestamp)
True iff the timestamp is a possible commit time (GT ZERO) -OR- a
ITx.READ_COMMITTED request. |
static boolean |
isReadWriteTx(long timestamp)
Return
true iff the timestamp is a possible read-write
transaction identifier (LT ZERO). |
static boolean |
isUnisolated(long timestamp) |
static String |
toString(long timestamp)
Formats the timestamp as a String.
|
public static String toString(long timestamp)
timestamp
- public static boolean isCommitTime(long timestamp)
Note: Both read-only transactions are commit times are positive. The transition identifier for a read-only transaction is chosen from among those distinct timestamps available between the effective commit time requested for the read-only transaction and the next commit time on the database.
timestamp
- The timestamp.true
for a possible commit time or a read-only tx.public static boolean isReadOnly(long timestamp)
ITx.READ_COMMITTED
request.timestamp
- The timestamp.true
for a possible commit time, a read-only tx, or
a ITx.READ_COMMITTED
request.public static boolean isReadWriteTx(long timestamp)
true
iff the timestamp is a possible read-write
transaction identifier (LT ZERO).timestamp
- The timestamp.true
iff the timestamp is a possible read-write
transaction identifier.public static boolean isReadCommittedOrUnisolated(long timestamp)
public static boolean isReadCommitted(long timestamp)
public static boolean isUnisolated(long timestamp)
public static long asHistoricalRead(long commitTime)
commitTime
- The commit time from IIndexStore.getLastCommitTime()
,
etc.IllegalArgumentException
- if commitTime is negative (zero is permitted for some
edge cases).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.