
public abstract class OTransactionRealAbstract extends OTransactionAbstract
| Modifier and Type | Class and Description |
|---|---|
static class |
OTransactionRealAbstract.OTransactionRecordIndexOperation
Represents information for each index operation for each record in DB.
|
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.
|
static ORecord |
DELETED_RECORD
USE THIS AS RESPONSE TO REPORT A DELETED RECORD IN TX
|
protected int |
id |
protected Map<String,OTransactionIndexChanges> |
indexEntries |
protected int |
newObjectCounter |
protected Map<ORID,List<OTransactionRealAbstract.OTransactionRecordIndexOperation>> |
recordIndexOperations |
protected Map<ORID,ORID> |
updatedRids |
protected Map<String,Object> |
userData |
database, isolationLevel, locks, status| Modifier | Constructor and Description |
|---|---|
protected |
OTransactionRealAbstract(ODatabaseDocumentTx database,
int id) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangedDocument(ODocument document) |
void |
addIndexEntry(OIndex<?> delegate,
String iIndexName,
OTransactionIndexChanges.OPERATION iOperation,
Object key,
OIdentifiable iValue) |
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> |
getAllRecordEntries() |
Collection<ORecordOperation> |
getCurrentRecordEntries() |
Object |
getCustomData(String iName) |
int |
getEntryCount() |
int |
getId() |
ODocument |
getIndexChanges() |
OTransactionIndexChanges |
getIndexChanges(String iIndexName)
Bufferizes index changes to be flushed at commit time.
|
Map<String,OTransactionIndexChanges> |
getIndexEntries() |
List<String> |
getInvolvedIndexes() |
List<ORecordOperation> |
getNewRecordEntriesByClass(OClass iClass,
boolean iPolymorphic)
Called by class iterator.
|
List<ORecordOperation> |
getNewRecordEntriesByClusterIds(int[] iIds)
Called by cluster iterator.
|
ORecord |
getRecord(ORID rid) |
ORecordOperation |
getRecordEntry(ORID rid) |
boolean |
hasRecordCreation() |
void |
restore() |
protected ODocument |
serializeIndexChangeEntry(OTransactionIndexChangesPerKey entry,
ODocument indexDoc) |
void |
setCustomData(String iName,
Object iValue) |
void |
updateIdentityAfterCommit(ORID oldRid,
ORID newRid)
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.
|
getClusterName, getDatabase, getIsolationLevel, getLockedRecords, getStatus, isActive, isLockedRecord, lockingStrategy, lockRecord, setIsolationLevel, unlockRecord, updateCacheFromEntriesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitamountOfNestedTxs, begin, commit, commit, deleteRecord, isUsingLog, loadRecord, loadRecord, loadRecord, loadRecordIfVersionIsNotLatest, recycleRecord, reloadRecord, reloadRecord, rollback, rollback, saveRecord, setUsingLogpublic static final ORecord DELETED_RECORD
protected Map<ORID,ORecordOperation> allEntries
protected Map<String,OTransactionIndexChanges> indexEntries
protected Map<ORID,List<OTransactionRealAbstract.OTransactionRecordIndexOperation>> recordIndexOperations
protected int id
protected int newObjectCounter
protected OTransactionRealAbstract(ODatabaseDocumentTx database, int id)
public boolean hasRecordCreation()
public void addChangedDocument(ODocument document)
public void close()
OTransactionAbstractclose in interface OTransactionclose in class OTransactionAbstractpublic int getId()
public void clearRecordEntries()
public void restore()
public int getEntryCount()
public Collection<ORecordOperation> getCurrentRecordEntries()
public Collection<ORecordOperation> getAllRecordEntries()
public ORecordOperation getRecordEntry(ORID rid)
public List<ORecordOperation> getNewRecordEntriesByClass(OClass iClass, boolean iPolymorphic)
public List<ORecordOperation> getNewRecordEntriesByClusterIds(int[] iIds)
public void clearIndexEntries()
public ODocument getIndexChanges()
public Map<String,OTransactionIndexChanges> getIndexEntries()
public OTransactionIndexChanges getIndexChanges(String iIndexName)
public void addIndexEntry(OIndex<?> delegate, String iIndexName, OTransactionIndexChanges.OPERATION iOperation, Object key, OIdentifiable iValue)
public void addIndexEntry(OIndex<?> delegate, String iIndexName, OTransactionIndexChanges.OPERATION iOperation, Object key, OIdentifiable iValue, boolean clientTrackOnly)
public void updateIdentityAfterCommit(ORID oldRid, ORID newRid)
OTransactionoldRid - Record identity before commit.newRid - Record identity after commit.protected void checkTransaction()
protected ODocument serializeIndexChangeEntry(OTransactionIndexChangesPerKey entry, ODocument indexDoc)
Copyright © 2009–2025 OrientDB. All rights reserved.