|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.journal.TimestampUtility
public class TimestampUtility
Some static helper methods for timestamps.
| Constructor Summary | |
|---|---|
TimestampUtility()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimestampUtility()
| Method Detail |
|---|
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).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||