Class NoOpLockWatchingCache

    • Method Detail

      • getCached

        public Map<Cell,​GuardedValue> getCached​(TableReference tableRef,
                                                      Set<Cell> reads)
        Description copied from interface: LockWatchingCache
        Given a table and a set of cells, the cache returns a map containing the latest cached GuardedValues for cells present in the cache.
        Specified by:
        getCached in interface LockWatchingCache
        Parameters:
        tableRef - table to read from
        reads - set of cells to read
        Returns:
        Cached values that are guaranteed to be the latest visible entries to the transaction making the request if the GuardedValue's timestamp matches the transaction's lock watch state
      • maybeCacheCommittedWrites

        public void maybeCacheCommittedWrites​(TableReference tableRef,
                                              Map<Cell,​byte[]> writes)
        Description copied from interface: LockWatchingCache
        After a transaction has committed, this notifies the cache that the writes can be cached, if desired.
        Specified by:
        maybeCacheCommittedWrites in interface LockWatchingCache
        Parameters:
        tableRef - the table to which the transaction wrote
        writes - actual writes
      • maybeCacheEntriesRead

        public void maybeCacheEntriesRead​(TableReference tableRef,
                                          Map<Cell,​byte[]> writes,
                                          com.palantir.lock.watch.LockWatchStateUpdate lwState)
        Description copied from interface: LockWatchingCache
        A transaction can attempt to cache entries read during the transaction using this method. The implementation of the LockWatchStateUpdate must correctly arbitrate which of the passed entries are safe to cache.
        Specified by:
        maybeCacheEntriesRead in interface LockWatchingCache
        Parameters:
        tableRef - table to cache entries for
        writes - entries read by the transaction
        lwState - lock watch state at the start of the transaction that read the entries
      • getView

        public TransactionLockWatchingCacheView getView​(long startTimestamp,
                                                        com.palantir.lock.watch.LockWatchStateUpdate lockWatchState)
        Description copied from interface: LockWatchingCache
        Creates a view of the cache for a transaction, based on the start timestamp and the lock watch state.
        Specified by:
        getView in interface LockWatchingCache
        Parameters:
        startTimestamp - of the transaction
        lockWatchState - returned from the StartTransactionWithWatchesResponse
        Returns:
        view of the cache