Interface OTransactionInternal
- All Superinterfaces:
OAllocationTransaction,OStorageTransaction,OTransaction
- All Known Implementing Classes:
OTransactionOptimistic,OTransactionOptimisticClient,OTransactionOptimisticDistributed,OTransactionOptimisticProxy,OTransactionOptimisticServer
public interface OTransactionInternal
extends OStorageTransaction, OAllocationTransaction, OTransaction
Expose the api for extract the internal details needed by the storage for perform the transaction
commit
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.tx.OTransaction
OTransaction.ISOLATION_LEVEL, OTransaction.TXSTATUS, OTransaction.TXTYPE -
Method Summary
Modifier and TypeMethodDescriptiondefault voidfill(Iterator<ORecordOperation> operations) Access to the database of the transactionExtract 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.default Optional<byte[]>getRecordEntry(ORID currentRid) Extract a single change from a specified record id.Extract all the record operations for the current transactionIterator<byte[]>default booleanvoidvoidvoidsetDatabase(ODatabaseDocumentInternal database) voidsetMetadataHolder(Optional<OTxMetadataHolder> metadata) voidsetStatus(OTransaction.TXSTATUS iStatus) Change the status of the transaction.default voidvoidupdateIdentityAfterCommit(ORID oldRID, ORID rid) Notify the transaction for the rid change, the changed will be tracked inside the transaction and used for remapping links.Methods inherited from interface com.orientechnologies.orient.core.storage.OAllocationTransaction
getRecordChangesMethods inherited from interface com.orientechnologies.orient.core.storage.OStorageTransaction
getChangesForIndex, getId, getRecordChanges, updateCacheMethods inherited from interface com.orientechnologies.orient.core.tx.OTransaction
addChangedDocument, addIndexEntry, amountOfNestedTxs, begin, close, commit, commit, deleteRecord, getClientTransactionId, getCustomData, getEntryCount, getId, getIndexChanges, getIndexChanges, getIndexChangesInternal, getInvolvedIndexes, getIsolationLevel, getNewRecordEntriesByClass, getNewRecordEntriesByClusterIds, getRecord, getStatus, isActive, isLockedRecord, loadRecord, loadRecordIfVersionIsNotLatest, lockingStrategy, lockRecord, reloadRecord, reloadRecord, rollback, rollback, saveRecord, setCustomData, setIsolationLevel, unlockRecord
-
Method Details
-
getRecordOperations
Collection<ORecordOperation> getRecordOperations()Extract all the record operations for the current transaction- Specified by:
getRecordOperationsin interfaceOTransaction- 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
Change the status of the transaction.- Parameters:
iStatus-
-
getDatabase
ODatabaseDocumentInternal getDatabase()Access to the database of the transaction- Specified by:
getDatabasein interfaceOTransaction- Returns:
-
updateIdentityAfterCommit
Notify the transaction for the rid change, the changed will be tracked inside the transaction and used for remapping links.- Specified by:
updateIdentityAfterCommitin interfaceOAllocationTransaction- Specified by:
updateIdentityAfterCommitin interfaceOStorageTransaction- Specified by:
updateIdentityAfterCommitin interfaceOTransaction- Parameters:
oldRID- the id old value.rid- the id new value.
-
getRecordEntry
Extract a single change from a specified record id.- Specified by:
getRecordEntryin interfaceOTransaction- Parameters:
currentRid- the record id for the change.- Returns:
- the change or null if there is no change for the specified rid
-
getLockedRecords
- Specified by:
getLockedRecordsin interfaceOStorageTransaction
-
setDatabase
-
isSequenceTransaction
default boolean isSequenceTransaction() -
getMetadata
- Specified by:
getMetadatain interfaceOStorageTransaction
-
setMetadataHolder
-
startedStorageTransaction
default void startedStorageTransaction()- Specified by:
startedStorageTransactionin interfaceOStorageTransaction
-
prepareSerializedOperations
- Throws:
IOException
-
getSerializedOperations
Iterator<byte[]> getSerializedOperations()- Specified by:
getSerializedOperationsin interfaceOStorageTransaction
-
fill
-
resetAllocatedIds
void resetAllocatedIds()
-