
public abstract class OTransactionRealAbstract extends OTransactionAbstract implements OTransactionInternal
OTransaction.ISOLATION_LEVEL, OTransaction.TXSTATUS, OTransaction.TXTYPE| Modifier and Type | Field and Description |
|---|---|
protected Map<ORID,ORecordOperation> |
allEntries |
protected Set<ODocument> |
changedDocuments
This set is used to track which documents are changed during tx, if documents are changed but not saved all changes are made
during tx will be undone.
|
protected int |
id |
protected Map<String,OTransactionIndexChanges> |
indexEntries |
protected int |
newObjectCounter |
protected Map<ORID,List<OTransactionRecordIndexOperation>> |
recordIndexOperations |
protected Map<ORID,ORID> |
updatedRids |
protected Map<String,Object> |
userData |
database, isolationLevel, locks, statusDELETED_RECORD| Modifier | Constructor and Description |
|---|---|
protected |
OTransactionRealAbstract(ODatabaseDocumentInternal database,
int id) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangedDocument(ODocument document)
Adds the given document to a set of changed documents known to this transaction.
|
void |
addIndexEntry(OIndex<?> delegate,
String iIndexName,
OTransactionIndexChanges.OPERATION iOperation,
Object key,
OIdentifiable iValue)
Adds the transactional index entry in this transaction.
|
void |
addIndexEntry(OIndex<?> delegate,
String iIndexName,
OTransactionIndexChanges.OPERATION iOperation,
Object key,
OIdentifiable iValue,
boolean clientTrackOnly)
Bufferizes index changes to be flushed at commit time.
|
protected void |
checkTransaction() |
void |
clearIndexEntries() |
void |
clearRecordEntries() |
void |
close()
Closes the transaction and releases all the acquired locks.
|
Collection<ORecordOperation> |
getCurrentRecordEntries() |
Object |
getCustomData(String iName)
Obtains the custom value by its name stored in the context of this transaction.
|
int |
getEntryCount() |
int |
getId() |
ODocument |
getIndexChanges() |
OTransactionIndexChanges |
getIndexChanges(String iIndexName)
Bufferizes index changes to be flushed at commit time.
|
OTransactionIndexChanges |
getIndexChangesInternal(String indexName)
Does the same thing as
OBasicTransaction.getIndexChanges(String), but handles remote storages in a special way. |
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.
|
List<String> |
getInvolvedIndexes() |
int |
getNewObjectCounter() |
List<ORecordOperation> |
getNewRecordEntriesByClass(OClass iClass,
boolean iPolymorphic)
Called by class iterator.
|
List<ORecordOperation> |
getNewRecordEntriesByClusterIds(int[] iIds)
Called by cluster iterator.
|
ORecord |
getRecord(ORID rid)
Resolves a record with the given RID in the context of this transaction.
|
ORecordOperation |
getRecordEntry(ORID rid)
Extract a single change from a specified record id.
|
Collection<ORecordOperation> |
getRecordOperations()
Extract all the record operations for the current transaction
|
Map<ORID,ORID> |
getUpdatedRids() |
boolean |
hasRecordCreation() |
void |
restore() |
protected ODocument |
serializeIndexChangeEntry(OTransactionIndexChangesPerKey entry,
ODocument indexDoc) |
void |
setCustomData(String iName,
Object iValue)
Sets the custom value by its name stored in the context of this transaction.
|
void |
setDatabase(ODatabaseDocumentInternal database) |
void |
updateIdentityAfterCommit(ORID oldRid,
ORID newRid)
Notify the transaction for the rid change, the changed will be tracked inside the transaction and used for remapping links.
|
getClusterName, getDatabase, getIsolationLevel, getLockedRecords, getStatus, internalRollback, isActive, isLockedRecord, lockingStrategy, lockRecord, setIsolationLevel, unlockRecord, updateCacheFromEntriesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDatabase, isUsingLog, setStatusdeleteRecord, getClientTransactionId, isActive, saveRecordamountOfNestedTxs, begin, commit, commit, isUsingLog, loadRecord, loadRecord, loadRecord, loadRecordIfVersionIsNotLatest, reloadRecord, reloadRecord, rollback, rollback, setUsingLogprotected Map<ORID,ORecordOperation> allEntries
protected Map<String,OTransactionIndexChanges> indexEntries
protected Map<ORID,List<OTransactionRecordIndexOperation>> recordIndexOperations
protected int id
protected int newObjectCounter
protected OTransactionRealAbstract(ODatabaseDocumentInternal database, int id)
public boolean hasRecordCreation()
hasRecordCreation in interface OTransactionpublic void addChangedDocument(ODocument document)
OBasicTransactionaddChangedDocument in interface OBasicTransactiondocument - the document to add.public void close()
OTransactionAbstractclose in interface OTransactionclose in class OTransactionAbstractpublic int getId()
getId in interface OBasicTransactionpublic void clearRecordEntries()
clearRecordEntries in interface OTransactionpublic void restore()
public int getEntryCount()
getEntryCount in interface OTransactionpublic Collection<ORecordOperation> getCurrentRecordEntries()
getCurrentRecordEntries in interface OTransactionpublic Collection<ORecordOperation> getRecordOperations()
OTransactionInternalgetRecordOperations in interface OTransactiongetRecordOperations in interface OTransactionInternalpublic ORecordOperation getRecordEntry(ORID rid)
OTransactionInternalgetRecordEntry in interface OTransactiongetRecordEntry in interface OTransactionInternalrid - the record id for the change.public ORecord getRecord(ORID rid)
OBasicTransactiongetRecord in interface OBasicTransactionrid - the record RID.null if no record is found, or OBasicTransaction.DELETED_RECORD if the record was deleted in
this transaction.public List<ORecordOperation> getNewRecordEntriesByClass(OClass iClass, boolean iPolymorphic)
getNewRecordEntriesByClass in interface OTransactionpublic List<ORecordOperation> getNewRecordEntriesByClusterIds(int[] iIds)
getNewRecordEntriesByClusterIds in interface OTransactionpublic void clearIndexEntries()
clearIndexEntries in interface OTransactionpublic List<String> getInvolvedIndexes()
getInvolvedIndexes in interface OTransactionpublic ODocument getIndexChanges()
getIndexChanges in interface OTransactionpublic Map<String,OTransactionIndexChanges> getIndexOperations()
OTransactionInternalgetIndexOperations in interface OTransactionInternalpublic OTransactionIndexChanges getIndexChanges(String iIndexName)
getIndexChanges in interface OBasicTransactioniIndexName - the index name.public OTransactionIndexChanges getIndexChangesInternal(String indexName)
OBasicTransactionOBasicTransaction.getIndexChanges(String), but handles remote storages in a special way.getIndexChangesInternal in interface OBasicTransactionindexName - the index name.null if index is not found or storage is remote.public void addIndexEntry(OIndex<?> delegate, String iIndexName, OTransactionIndexChanges.OPERATION iOperation, Object key, OIdentifiable iValue)
OBasicTransactionaddIndexEntry in interface OBasicTransactiondelegate - the index.iIndexName - the index name.iOperation - the index operation to register.key - the index key.iValue - the index key value.public void addIndexEntry(OIndex<?> delegate, String iIndexName, OTransactionIndexChanges.OPERATION iOperation, Object key, OIdentifiable iValue, boolean clientTrackOnly)
public void updateIdentityAfterCommit(ORID oldRid, ORID newRid)
OTransactionInternalupdateIdentityAfterCommit in interface OTransactionupdateIdentityAfterCommit in interface OTransactionInternaloldRid - the id old value.newRid - the id new value.protected void checkTransaction()
protected ODocument serializeIndexChangeEntry(OTransactionIndexChangesPerKey entry, ODocument indexDoc)
public void setCustomData(String iName, Object iValue)
OBasicTransactionsetCustomData in interface OBasicTransactioniName - the value name.iValue - the value to store.public Object getCustomData(String iName)
OBasicTransactiongetCustomData in interface OBasicTransactioniName - the value name.null if no value found.public int getNewObjectCounter()
public void setDatabase(ODatabaseDocumentInternal database)
setDatabase in interface OTransactionInternalCopyright © 2009–2025 OrientDB. All rights reserved.