Class OTransactionNoTx

java.lang.Object
com.orientechnologies.orient.core.tx.OTransactionAbstract
com.orientechnologies.orient.core.tx.OTransactionNoTx
All Implemented Interfaces:
OTransaction

public class OTransactionNoTx extends OTransactionAbstract
No operation transaction.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
  • Constructor Details

  • Method Details

    • begin

      public void begin()
    • commit

      public void commit()
    • getEntryCount

      public int getEntryCount()
    • commit

      public void commit(boolean force)
    • rollback

      public void rollback()
    • loadRecord

      public ORecord loadRecord(ORID iRid, ORecord iRecord, String iFetchPlan, boolean ignoreCache)
    • reloadRecord

      public ORecord reloadRecord(ORID rid, ORecord record, String fetchPlan, boolean ignoreCache)
    • reloadRecord

      public ORecord reloadRecord(ORID rid, ORecord record, String fetchPlan, boolean ignoreCache, boolean force)
    • loadRecordIfVersionIsNotLatest

      public ORecord loadRecordIfVersionIsNotLatest(ORID rid, int recordVersion, String fetchPlan, boolean ignoreCache) throws ORecordNotFoundException
      Throws:
      ORecordNotFoundException
    • saveRecord

      public ORecord saveRecord(ORecord iRecord, String iClusterName, boolean iForceCreate)
      Update the record.
      Parameters:
      iRecord -
      iForceCreate -
      iRecordCreatedCallback -
      iRecordUpdatedCallback -
      Returns:
      the record saved.
    • setIsolationLevel

      public OTransaction setIsolationLevel(OTransaction.ISOLATION_LEVEL isolationLevel)
      Description copied from interface: OTransaction
      Changes the isolation level. Default is READ_COMMITTED. When REPEATABLE_READ is set, any record read from the storage is cached in memory to guarantee the repeatable reads. This affects the used RAM and speed (because JVM Garbage Collector job).
      Specified by:
      setIsolationLevel in interface OTransaction
      Overrides:
      setIsolationLevel in class OTransactionAbstract
      Parameters:
      isolationLevel - Isolation level to set
      Returns:
      Current object to allow call in chain
    • deleteRecord

      public void deleteRecord(ORecord iRecord)
      Deletes the record.
      Parameters:
      iRecord - the record to delete.
    • getRecordOperations

      public Collection<ORecordOperation> getRecordOperations()
    • getNewRecordEntriesByClass

      public List<ORecordOperation> getNewRecordEntriesByClass(OClass iClass, boolean iPolymorphic)
    • getNewRecordEntriesByClusterIds

      public List<ORecordOperation> getNewRecordEntriesByClusterIds(int[] iIds)
    • getRecordEntriesSize

      public int getRecordEntriesSize()
    • getRecord

      public ORecord getRecord(ORID rid)
      Description copied from interface: OTransaction
      Resolves a record with the given RID in the context of this transaction.
      Parameters:
      rid - the record RID.
      Returns:
      the resolved record, or null if no record is found, or OTransactionAbstract.DELETED_RECORD if the record was deleted in this transaction.
    • getRecordEntry

      public ORecordOperation getRecordEntry(ORID rid)
    • setCustomData

      public void setCustomData(String iName, Object iValue)
      Description copied from interface: OTransaction
      Sets the custom value by its name stored in the context of this transaction.
      Parameters:
      iName - the value name.
      iValue - the value to store.
    • getCustomData

      public Object getCustomData(String iName)
      Description copied from interface: OTransaction
      Obtains the custom value by its name stored in the context of this transaction.
      Parameters:
      iName - the value name.
      Returns:
      the obtained value or null if no value found.
    • getIndexChanges

      public ODocument getIndexChanges()
    • addIndexEntry

      public void addIndexEntry(OIndex delegate, String indexName, OTransactionIndexChanges.OPERATION status, Object key, OIdentifiable value)
      Description copied from interface: OTransaction
      Adds the transactional index entry in this transaction.
      Parameters:
      delegate - the index.
      indexName - the index name.
      status - the index operation to register.
      key - the index key.
      value - the index key value.
    • addChangedDocument

      public void addChangedDocument(ODocument document)
      Description copied from interface: OTransaction
      Adds the given document to a set of changed documents known to this transaction.
      Parameters:
      document - the document to add.
    • getIndexChanges

      public OTransactionIndexChanges getIndexChanges(String iName)
      Description copied from interface: OTransaction
      Obtains the index changes done in the context of this transaction.
      Parameters:
      iName - the index name.
      Returns:
      the index changes in question or null if index is not found.
    • getId

      public int getId()
    • getInvolvedIndexes

      public List<String> getInvolvedIndexes()
    • updateIdentityAfterCommit

      public void updateIdentityAfterCommit(ORID oldRid, ORID newRid)
      Description copied from interface: OTransaction
      When commit in transaction is performed all new records will change their identity, but index values will contain stale links, to fix them given method will be called for each entry. This update local transaction maps too.
      Parameters:
      oldRid - Record identity before commit.
      newRid - Record identity after commit.
    • amountOfNestedTxs

      public int amountOfNestedTxs()
    • rollback

      public void rollback(boolean force, int commitLevelDiff)
    • getIndexChangesInternal

      public OTransactionIndexChanges getIndexChangesInternal(String indexName)
      Description copied from interface: OTransaction
      Does the same thing as OTransaction.getIndexChanges(String), but handles remote storages in a special way.
      Parameters:
      indexName - the index name.
      Returns:
      the index changes in question or null if index is not found or storage is remote.
    • internalRollback

      public void internalRollback()
      Specified by:
      internalRollback in class OTransactionAbstract