Class AbstractTransaction

java.lang.Object
org.neo4j.ogm.transaction.AbstractTransaction
All Implemented Interfaces:
AutoCloseable, Transaction

public abstract class AbstractTransaction extends Object implements Transaction
Author:
vince
  • Field Details

  • Constructor Details

    • AbstractTransaction

      protected AbstractTransaction(TransactionManager transactionManager)
  • Method Details

    • rollback

      public void rollback()
      Description copied from interface: Transaction
      rollback a transaction that has pending writes
      Specified by:
      rollback in interface Transaction
    • commit

      public void commit()
      Description copied from interface: Transaction
      commit a transaction that has pending writes
      Specified by:
      commit in interface Transaction
    • canCommit

      public boolean canCommit()
      Description copied from interface: Transaction
      If this transaction can be committed
      Specified by:
      canCommit in interface Transaction
      Returns:
      true if this transaction can be committed
    • extend

      public void extend(Transaction.Type otherType)
      Extends the current transaction.
      Parameters:
      otherType - type of the other transaction
    • status

      public final Transaction.Status status()
      Description copied from interface: Transaction
      return the status of the current transaction
      Specified by:
      status in interface Transaction
      Returns:
      the Status value associated with the current transaction
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: Transaction
      Obtains the read-only status of a transaction. Transaction are read-write by default
      Specified by:
      isReadOnly in interface Transaction
      Returns:
      true if this is a read-only transaction, false otherwise
    • type

      public Transaction.Type type()
      Description copied from interface: Transaction
      Returns type of the transaction - READ_ONLY / READ_WRITE The value corresponds to type returned by Transaction.isReadOnly()
      Specified by:
      type in interface Transaction
      Returns:
      type of the transaction
    • close

      public void close()
      Description copied from interface: Transaction
      close this transaction.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Transaction
    • extensions

      public long extensions()
    • registerNew

      public void registerNew(Object persisted)
    • registeredNew

      public List<Object> registeredNew()