Class TransactionLog<T>

  • Type Parameters:
    T - log record type

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

      Constructors 
      Constructor Description
      TransactionLog​(TransactionId transactionId, long version, java.util.List<T> records)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)  
      int hashCode()  
      <U> TransactionLog<U> map​(java.util.function.Function<T,​U> mapper)
      Maps this instance to another MapTransaction with different key and value types.
      java.util.List<T> records()
      Returns the list of transaction log records.
      java.lang.String toString()  
      TransactionId transactionId()
      Returns the transaction identifier.
      long version()
      Returns the transaction lock version.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TransactionLog

        public TransactionLog​(TransactionId transactionId,
                              long version,
                              java.util.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 java.util.List<T> records()
        Returns the list of transaction log records.
        Returns:
        a list of transaction log records
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • map

        public <U> TransactionLog<U> map​(java.util.function.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