Class Transaction

  • All Implemented Interfaces:
    Buildable, java.lang.Cloneable

    public class Transaction
    extends ImmutableObject
    implements Buildable
    A SQL transaction that can be serialized and stored in its own table.

    Transaction is used to store transactions committed to Cloud SQL in a Transaction table during the second phase of our migration, during which time we will be asynchronously replaying Cloud SQL transactions to datastore.

    TODO(mmuller): Use these from TransactionManager to store the contents of an SQL transaction for asynchronous propagation to datastore. Implement a cron endpoint that reads them from the Transaction table and calls writeToDatastore().

    • Constructor Detail

      • Transaction

        public Transaction()
    • Method Detail

      • writeToDatastore

        public void writeToDatastore()
        Write the entire transaction to the datastore in a datastore transaction.
      • serialize

        public byte[] serialize()
        Serialize a transaction to a byte array.
      • deserialize

        public static Transaction deserialize​(byte[] serializedTransaction)
      • isEmpty

        public boolean isEmpty()
        Returns true if the transaction contains no mutations.