Class TransactionLog<T>

  • Type Parameters:
    T - log record type

    public class TransactionLog<T>
    extends Object
    Collection of transaction updates to be applied atomically.
    • Constructor Detail

      • TransactionLog

        public TransactionLog​(TransactionId transactionId,
                              long version,
                              List<T> records)
    • Method Detail

      • transactionId

        public TransactionId transactionId()
        Returns the transaction identifier.
        Returns:
        transaction id
      • version

        public long version()
        Returns the transaction lock version.
        Returns:
        the transaction lock version
      • records

        public List<T> records()
        Returns the list of transaction log records.
        Returns:
        a list of transaction log records
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • map

        public <U> TransactionLog<U> map​(Function<T,​U> mapper)
        Maps this instance to another MapTransaction with different key and value types.
        Type Parameters:
        U - record type of returned instance
        Parameters:
        mapper - function for mapping record types
        Returns:
        newly typed instance