Interface TransactionLockWatchingCacheView

    • Method Detail

      • readCached

        Map<Cell,​byte[]> readCached​(TableReference tableRef,
                                          Set<Cell> cells)
        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.
        Parameters:
        tableRef - table to read from
        cells - 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

        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. It is the responsibility of the underlying LockWatchingCache to arbitrate which, if any, values should be cached.
        Parameters:
        tableRef - table we read from
        writes - entries read from the KVS
        lwState - lock watch state when the view was created
      • tryCacheWrittenValues

        void tryCacheWrittenValues​(TableReference tableRef,
                                   Map<Cell,​byte[]> writes,
                                   long lockTs)
        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 underlying LockWatchingCache to arbitrate which, if any, values should be cached.
        Parameters:
        tableRef - table we wrote to
        writes - entries written to the KVS
        lockTs - lock timestamp of the TimestampedLockResponse from acquiring locks