Class NoOpTransactionLockWatchingCacheView
- java.lang.Object
-
- com.palantir.atlasdb.transaction.api.NoOpTransactionLockWatchingCacheView
-
- All Implemented Interfaces:
TransactionLockWatchingCacheView
public final class NoOpTransactionLockWatchingCacheView extends Object implements TransactionLockWatchingCacheView
-
-
Field Summary
Fields Modifier and Type Field Description static NoOpTransactionLockWatchingCacheView
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Cell,byte[]>
readCached(TableReference tableRef, Set<Cell> cells)
Attempts to read the cached versions of cells.void
tryCacheNewValuesRead(TableReference tableRef, Map<Cell,byte[]> writes, com.palantir.lock.watch.LockWatchStateUpdate lwState)
Try to cache values read from the kvs in this transaction.void
tryCacheWrittenValues(TableReference tableRef, Map<Cell,byte[]> writes, long lockTs)
Try to cache values written to the kvs in this transaction.
-
-
-
Field Detail
-
INSTANCE
public static final NoOpTransactionLockWatchingCacheView INSTANCE
-
-
Method Detail
-
readCached
public Map<Cell,byte[]> readCached(TableReference tableRef, Set<Cell> cells)
Description copied from interface:TransactionLockWatchingCacheView
Attempts to read the cached versions of cells. If there is no suitable cached value for the cell, it will not be present in the returned map.- Specified by:
readCached
in interfaceTransactionLockWatchingCacheView
- Parameters:
tableRef
- table to read fromcells
- cells to read- Returns:
- a mapping with all cells that were cached and guaranteed to be equal to what the transaction would have read from the kvs.
-
tryCacheNewValuesRead
public void tryCacheNewValuesRead(TableReference tableRef, Map<Cell,byte[]> writes, com.palantir.lock.watch.LockWatchStateUpdate lwState)
Description copied from interface:TransactionLockWatchingCacheView
Try to cache values read from the kvs in this transaction. It is the responsibility of the underlyingLockWatchingCache
to arbitrate which, if any, values should be cached.- Specified by:
tryCacheNewValuesRead
in interfaceTransactionLockWatchingCacheView
- Parameters:
tableRef
- table we read fromwrites
- entries read from the KVSlwState
- lock watch state when the view was created
-
tryCacheWrittenValues
public void tryCacheWrittenValues(TableReference tableRef, Map<Cell,byte[]> writes, long lockTs)
Description copied from interface:TransactionLockWatchingCacheView
Try to cache values written to the kvs in this transaction. This method must be called only after the writing transaction has successfully committed. It is the responsibility of the underlyingLockWatchingCache
to arbitrate which, if any, values should be cached.- Specified by:
tryCacheWrittenValues
in interfaceTransactionLockWatchingCacheView
- Parameters:
tableRef
- table we wrote towrites
- entries written to the KVSlockTs
- lock timestamp of theTimestampedLockResponse
from acquiring locks
-
-