public class TxUtils extends Object
| Constructor and Description |
|---|
TxUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Transaction |
createDummyTransaction(TransactionSnapshot snapshot)
Creates a "dummy" transaction based on the given snapshot's state.
|
static long |
getFirstShortInProgress(Map<Long,TransactionManager.InProgressTx> inProgress)
Returns the write pointer for the first "short" transaction that in the in-progress set, or
Transaction.NO_TX_IN_PROGRESS if none. |
static long |
getMaxVisibleTimestamp(Transaction tx)
Returns the maximum timestamp to use for time-range operations, based on the given transaction.
|
static long |
getOldestVisibleTimestamp(Map<byte[],Long> ttlByFamily,
Transaction tx)
Returns the oldest visible timestamp for the given transaction, based on the TTLs configured for each column
family.
|
public static long getOldestVisibleTimestamp(Map<byte[],Long> ttlByFamily, Transaction tx)
0.ttlByFamily - A map of column family name to TTL value (in milliseconds)tx - The current transactionpublic static long getMaxVisibleTimestamp(Transaction tx)
tx - The current transactionpublic static Transaction createDummyTransaction(TransactionSnapshot snapshot)
Long.MAX_VALUE to avoid mis-identifying any cells as
being written by this transaction (and therefore visible).public static long getFirstShortInProgress(Map<Long,TransactionManager.InProgressTx> inProgress)
Transaction.NO_TX_IN_PROGRESS if none.Copyright © 2015. All Rights Reserved.