public interface OTransaction extends OBasicTransaction
Modifier and Type | Interface and Description |
---|---|
static class |
OTransaction.ISOLATION_LEVEL |
static class |
OTransaction.TXSTATUS |
static class |
OTransaction.TXTYPE |
DELETED_RECORD
Modifier and Type | Method and Description |
---|---|
int |
amountOfNestedTxs() |
void |
begin() |
void |
clearIndexEntries()
Deprecated.
|
void |
clearRecordEntries()
Deprecated.
|
void |
close() |
void |
commit() |
void |
commit(boolean force) |
Iterable<? extends ORecordOperation> |
getCurrentRecordEntries()
Deprecated.
|
ODatabaseDocument |
getDatabase() |
int |
getEntryCount() |
ODocument |
getIndexChanges() |
List<String> |
getInvolvedIndexes() |
OTransaction.ISOLATION_LEVEL |
getIsolationLevel()
Returns the current isolation level.
|
HashMap<ORID,OStorage.LOCKING_STRATEGY> |
getLockedRecords() |
List<ORecordOperation> |
getNewRecordEntriesByClass(OClass iClass,
boolean iPolymorphic) |
List<ORecordOperation> |
getNewRecordEntriesByClusterIds(int[] iIds) |
ORecordOperation |
getRecordEntry(ORID rid) |
Iterable<? extends ORecordOperation> |
getRecordOperations() |
OTransaction.TXSTATUS |
getStatus() |
boolean |
hasRecordCreation() |
boolean |
isLockedRecord(OIdentifiable iRecord) |
boolean |
isUsingLog() |
ORecord |
loadRecord(ORID iRid,
ORecord iRecord,
String iFetchPlan,
boolean ignoreCache) |
ORecord |
loadRecord(ORID iRid,
ORecord iRecord,
String iFetchPlan,
boolean ignoreCache,
boolean iUpdateCache,
boolean loadTombstone,
OStorage.LOCKING_STRATEGY iLockingStrategy)
Deprecated.
|
ORecord |
loadRecord(ORID iRid,
ORecord iRecord,
String iFetchPlan,
boolean ignoreCache,
boolean loadTombstone,
OStorage.LOCKING_STRATEGY iLockingStrategy)
Deprecated.
|
ORecord |
loadRecordIfVersionIsNotLatest(ORID rid,
int recordVersion,
String fetchPlan,
boolean ignoreCache) |
OStorage.LOCKING_STRATEGY |
lockingStrategy(OIdentifiable iRecord) |
OTransaction |
lockRecord(OIdentifiable iRecord,
OStorage.LOCKING_STRATEGY iLockingStrategy) |
ORecord |
reloadRecord(ORID iRid,
ORecord iRecord,
String iFetchPlan,
boolean ignoreCache) |
ORecord |
reloadRecord(ORID iRid,
ORecord iRecord,
String iFetchPlan,
boolean ignoreCache,
boolean force) |
void |
rollback() |
void |
rollback(boolean force,
int commitLevelDiff) |
OTransaction |
setIsolationLevel(OTransaction.ISOLATION_LEVEL iIsolationLevel)
Changes the isolation level.
|
void |
setUsingLog(boolean useLog)
If you set this flag to false, you are unable to
Rollback data changes in case of exception
Restore data in case of server crash
|
OTransaction |
unlockRecord(OIdentifiable iRecord) |
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.
|
addChangedDocument, addIndexEntry, deleteRecord, getClientTransactionId, getCustomData, getId, getIndexChanges, getIndexChangesInternal, getRecord, isActive, saveRecord, setCustomData
void begin()
void commit()
void commit(boolean force)
void rollback()
OTransaction.ISOLATION_LEVEL getIsolationLevel()
OTransaction setIsolationLevel(OTransaction.ISOLATION_LEVEL iIsolationLevel)
iIsolationLevel
- Isolation level to setvoid rollback(boolean force, int commitLevelDiff)
ODatabaseDocument getDatabase()
@Deprecated void clearRecordEntries()
@Deprecated ORecord loadRecord(ORID iRid, ORecord iRecord, String iFetchPlan, boolean ignoreCache, boolean loadTombstone, OStorage.LOCKING_STRATEGY iLockingStrategy)
@Deprecated ORecord loadRecord(ORID iRid, ORecord iRecord, String iFetchPlan, boolean ignoreCache, boolean iUpdateCache, boolean loadTombstone, OStorage.LOCKING_STRATEGY iLockingStrategy)
ORecord reloadRecord(ORID iRid, ORecord iRecord, String iFetchPlan, boolean ignoreCache)
ORecord reloadRecord(ORID iRid, ORecord iRecord, String iFetchPlan, boolean ignoreCache, boolean force)
ORecord loadRecordIfVersionIsNotLatest(ORID rid, int recordVersion, String fetchPlan, boolean ignoreCache) throws ORecordNotFoundException
ORecordNotFoundException
OTransaction.TXSTATUS getStatus()
@Deprecated Iterable<? extends ORecordOperation> getCurrentRecordEntries()
Iterable<? extends ORecordOperation> getRecordOperations()
List<ORecordOperation> getNewRecordEntriesByClass(OClass iClass, boolean iPolymorphic)
List<ORecordOperation> getNewRecordEntriesByClusterIds(int[] iIds)
ORecordOperation getRecordEntry(ORID rid)
ODocument getIndexChanges()
@Deprecated void clearIndexEntries()
boolean isUsingLog()
void setUsingLog(boolean useLog)
So you practically unable to work in multithreaded environment and keep data consistent.
void close()
void updateIdentityAfterCommit(ORID oldRid, ORID newRid)
oldRid
- Record identity before commit.newRid
- Record identity after commit.int amountOfNestedTxs()
boolean isLockedRecord(OIdentifiable iRecord)
OStorage.LOCKING_STRATEGY lockingStrategy(OIdentifiable iRecord)
OTransaction lockRecord(OIdentifiable iRecord, OStorage.LOCKING_STRATEGY iLockingStrategy)
OTransaction unlockRecord(OIdentifiable iRecord)
HashMap<ORID,OStorage.LOCKING_STRATEGY> getLockedRecords()
int getEntryCount()
boolean hasRecordCreation()
Copyright © 2009–2019 OrientDB. All rights reserved.