Interface OTransactionInternal

All Superinterfaces:
OTransaction
All Known Implementing Classes:
OTransactionOptimistic, OTransactionOptimisticClient, OTransactionOptimisticDistributed, OTransactionOptimisticProxy, OTransactionOptimisticServer, OTransactionRealAbstract

public interface OTransactionInternal extends OTransaction
Expose the api for extract the internal details needed by the storage for perform the transaction commit
  • Method Details

    • getRecordOperations

      Collection<ORecordOperation> getRecordOperations()
      Extract all the record operations for the current transaction
      Specified by:
      getRecordOperations in interface OTransaction
      Returns:
      the record operations, the collection should not be modified.
    • getIndexOperations

      Map<String,OTransactionIndexChanges> getIndexOperations()
      Extract all the calculated index operations for the current transaction changes, the key of the map is the index name the value all the changes for the specified index.
      Returns:
      the index changes, the map should not be modified.
    • setStatus

      void setStatus(OTransaction.TXSTATUS iStatus)
      Change the status of the transaction.
      Parameters:
      iStatus -
    • getDatabase

      Access to the database of the transaction
      Specified by:
      getDatabase in interface OTransaction
      Returns:
    • updateIdentityAfterCommit

      void updateIdentityAfterCommit(ORID oldRID, ORID rid)
      Notify the transaction for the rid change, the changed will be tracked inside the transaction and used for remapping links.
      Specified by:
      updateIdentityAfterCommit in interface OTransaction
      Parameters:
      oldRID - the id old value.
      rid - the id new value.
    • isUsingLog

      @Deprecated boolean isUsingLog()
      Deprecated.
      Retrieve if log is enabled for the transaction
      Specified by:
      isUsingLog in interface OTransaction
    • getRecordEntry

      ORecordOperation getRecordEntry(ORID currentRid)
      Extract a single change from a specified record id.
      Specified by:
      getRecordEntry in interface OTransaction
      Parameters:
      currentRid - the record id for the change.
      Returns:
      the change or null if there is no change for the specified rid
    • getLockedRecords

      Set<ORID> getLockedRecords()
    • setDatabase

      void setDatabase(ODatabaseDocumentInternal database)
    • isSequenceTransaction

      default boolean isSequenceTransaction()
    • getMetadata

      default Optional<byte[]> getMetadata()
    • setMetadataHolder

      void setMetadataHolder(Optional<OTxMetadataHolder> metadata)
    • storageBegun

      default void storageBegun()
    • prepareSerializedOperations

      void prepareSerializedOperations() throws IOException
      Throws:
      IOException
    • getSerializedOperations

      Iterator<byte[]> getSerializedOperations()
    • fill

      default void fill(Iterator<ORecordOperation> operations)
    • resetAllocatedIds

      void resetAllocatedIds()