Class OTransactionAbstract
java.lang.Object
com.orientechnologies.orient.core.tx.OTransactionAbstract
- All Implemented Interfaces:
OTransaction
- Direct Known Subclasses:
OTransactionNoTx,OTransactionOptimistic
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.orientechnologies.orient.core.tx.OTransaction
OTransaction.ISOLATION_LEVEL, OTransaction.TXSTATUS, OTransaction.TXTYPE -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ODatabaseDocumentInternalstatic final ORecordIndicates the record deleted in a transaction.protected OTransaction.ISOLATION_LEVELprotected Map<ORID,OTransactionAbstract.LockedRecordMetadata> protected OTransaction.TXSTATUS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOTransactionAbstract(ODatabaseDocumentInternal iDatabase) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the transaction and releases all the acquired locks.Returns the current isolation level.abstract voidbooleanisActive()booleanisLockedRecord(OIdentifiable iRecord) lockingStrategy(OIdentifiable record) lockRecord(OIdentifiable iRecord, OStorage.LOCKING_STRATEGY lockingStrategy) newOp(OIdentifiable iRecord, byte iStatus) voidsetDatabase(ODatabaseDocumentInternal database) setIsolationLevel(OTransaction.ISOLATION_LEVEL isolationLevel) Changes the isolation level.protected voidvoidtrackLockedRecord(ORID rid, OStorage.LOCKING_STRATEGY lockingStrategy) trackUnlockRecord(ORID rid) unlockRecord(OIdentifiable iRecord) static voidupdateCacheFromEntries(ODatabaseDocumentInternal database, Iterable<? extends ORecordOperation> entries, boolean keepInCache) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.tx.OTransaction
addChangedDocument, addIndexEntry, amountOfNestedTxs, begin, commit, commit, deleteRecord, getClientTransactionId, getCustomData, getEntryCount, getId, getIndexChanges, getIndexChanges, getIndexChangesInternal, getInvolvedIndexes, getNewRecordEntriesByClass, getNewRecordEntriesByClusterIds, getRecord, getRecordEntry, getRecordOperations, loadRecord, loadRecordIfVersionIsNotLatest, reloadRecord, reloadRecord, rollback, rollback, saveRecord, setCustomData, updateIdentityAfterCommit
-
Field Details
-
database
-
status
-
isolationLevel
-
locks
-
DELETED_RECORD
Indicates the record deleted in a transaction.- See Also:
-
-
Constructor Details
-
OTransactionAbstract
-
-
Method Details
-
updateCacheFromEntries
public static void updateCacheFromEntries(ODatabaseDocumentInternal database, Iterable<? extends ORecordOperation> entries, boolean keepInCache) -
getIsolationLevel
Description copied from interface:OTransactionReturns the current isolation level.- Specified by:
getIsolationLevelin interfaceOTransaction
-
setIsolationLevel
Description copied from interface:OTransactionChanges 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:
setIsolationLevelin interfaceOTransaction- Parameters:
isolationLevel- Isolation level to set- Returns:
- Current object to allow call in chain
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceOTransaction- Returns:
trueif this transaction is active,falseotherwise.
-
getStatus
- Specified by:
getStatusin interfaceOTransaction
-
getDatabase
- Specified by:
getDatabasein interfaceOTransaction
-
close
public void close()Closes the transaction and releases all the acquired locks.- Specified by:
closein interfaceOTransaction
-
lockRecord
- Specified by:
lockRecordin interfaceOTransaction
-
isLockedRecord
- Specified by:
isLockedRecordin interfaceOTransaction
-
lockingStrategy
- Specified by:
lockingStrategyin interfaceOTransaction
-
unlockRecord
- Specified by:
unlockRecordin interfaceOTransaction
-
internalRollback
public abstract void internalRollback() -
trackLockedRecord
-
trackUnlockRecord
-
getInternalLocks
-
setLocks
-
getLockedRecords
-
setDatabase
-
newOp
-