Class InteractiveTransaction

  • All Implemented Interfaces:
    UpdateContext, java.lang.AutoCloseable

    public class InteractiveTransaction
    extends TransactionWithReads
    implements java.lang.AutoCloseable
    • Field Detail

      • connection

        protected Connection connection
        The explicit connection object.
      • antidoteClient

        protected final AntidoteClient antidoteClient
        The antidote client.
      • descriptor

        protected com.google.protobuf.ByteString descriptor
        The descriptor.
    • Constructor Detail

      • InteractiveTransaction

        public InteractiveTransaction​(AntidoteClient antidoteClient)
        Instantiates a new antidote transaction.
        Parameters:
        antidoteClient - the antidote client
    • Method Detail

      • getClient

        protected AntidoteClient getClient()
        Get the antidote client.
        Returns:
        the antidote client
      • commitTransaction

        public CommitInfo commitTransaction()
        Commit transaction.
      • abortTransaction

        public void abortTransaction()
        Abort transaction.
      • updateHelper

        protected void updateHelper​(AntidotePB.ApbUpdateOperation.Builder operation,
                                    java.lang.String name,
                                    java.lang.String bucket,
                                    AntidotePB.CRDT_type type)
        Update helper that has the generic part of the code.
        Parameters:
        operation - the operation
        name - the name
        bucket - the bucket
        type - the type
      • readHelper

        protected AntidotePB.ApbReadObjectsResp readHelper​(com.google.protobuf.ByteString bucket,
                                                           com.google.protobuf.ByteString key,
                                                           AntidotePB.CRDT_type type)
        Read helper that has the generic part of the code.
        Returns:
        the apb read objects resp
      • getDescriptor

        protected com.google.protobuf.ByteString getDescriptor()
      • close

        public void close()
        Close the transaction.
        Specified by:
        close in interface java.lang.AutoCloseable