
public class ODistributedTransactionManager extends Object
| Constructor and Description |
|---|
ODistributedTransactionManager(ODistributedStorage storage,
ODistributedServerManager manager,
ODistributedDatabase iDDatabase) |
| Modifier and Type | Method and Description |
|---|---|
static void |
acquireMultipleRecordLocks(Object iThis,
ODistributedServerManager dManager,
ODistributedDatabase localDistributedDatabase,
List<com.orientechnologies.orient.core.id.ORecordId> recordsToLock,
int maxAutoRetry,
int autoRetryDelay,
ODistributedStorageEventListener eventListener,
ODistributedTxContext reqContext,
long timeout) |
protected void |
acquireMultipleRecordLocks(com.orientechnologies.orient.core.tx.OTransaction iTx,
int maxAutoRetry,
int autoRetryDelay,
ODistributedStorageEventListener eventListener,
ODistributedTxContext reqContext)
Acquires lock in block by using an optimistic approach with retry & random delay.
|
protected void |
checkForClusterIds(com.orientechnologies.orient.core.tx.OTransaction iTx,
String localNodeName,
ODistributedConfiguration dbCfg) |
List<com.orientechnologies.orient.core.db.record.ORecordOperation> |
commit(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx database,
com.orientechnologies.orient.core.tx.OTransaction iTx,
Runnable callback,
ODistributedStorageEventListener eventListener) |
protected OTxTaskResult |
createLocalTxResult(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult) |
protected OTxTask |
createTxTask(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult) |
protected List<OAbstractRemoteTask> |
createUndoTasksFromTx(com.orientechnologies.orient.core.tx.OTransaction iTx)
Create undo content for distributed 2-phase rollback.
|
protected void |
executeAsyncTx(Set<String> nodes,
OTxTaskResult localResult,
Set<String> involvedClusters,
OAbstractReplicatedTask txTask,
long messageId,
String localNodeName,
com.orientechnologies.common.util.OCallable<Void,ODistributedRequestId> afterSendCallback) |
protected Set<String> |
getAvailableNodesButLocal(ODistributedConfiguration dbCfg,
Set<String> involvedClusters,
String localNodeName) |
protected Set<String> |
getInvolvedClusters(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult) |
protected boolean |
processCommitResult(String localNodeName,
com.orientechnologies.orient.core.tx.OTransaction iTx,
OTxTask txTask,
Set<String> involvedClusters,
Iterable<com.orientechnologies.orient.core.db.record.ORecordOperation> tmpEntries,
Collection<String> nodes,
int autoRetryDelay,
ODistributedRequestId reqId,
ODistributedResponse dResponse,
boolean isLastRetry) |
protected void |
updateUndoTaskWithCreatedRecords(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult,
List<OAbstractRemoteTask> undoTasks) |
public ODistributedTransactionManager(ODistributedStorage storage, ODistributedServerManager manager, ODistributedDatabase iDDatabase)
public List<com.orientechnologies.orient.core.db.record.ORecordOperation> commit(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx database, com.orientechnologies.orient.core.tx.OTransaction iTx, Runnable callback, ODistributedStorageEventListener eventListener)
protected void checkForClusterIds(com.orientechnologies.orient.core.tx.OTransaction iTx,
String localNodeName,
ODistributedConfiguration dbCfg)
protected Set<String> getAvailableNodesButLocal(ODistributedConfiguration dbCfg, Set<String> involvedClusters, String localNodeName)
protected void executeAsyncTx(Set<String> nodes, OTxTaskResult localResult, Set<String> involvedClusters, OAbstractReplicatedTask txTask, long messageId, String localNodeName, com.orientechnologies.common.util.OCallable<Void,ODistributedRequestId> afterSendCallback)
protected void updateUndoTaskWithCreatedRecords(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult, List<OAbstractRemoteTask> undoTasks)
protected Set<String> getInvolvedClusters(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult)
protected OTxTask createTxTask(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult)
protected OTxTaskResult createLocalTxResult(List<com.orientechnologies.orient.core.db.record.ORecordOperation> uResult)
protected void acquireMultipleRecordLocks(com.orientechnologies.orient.core.tx.OTransaction iTx,
int maxAutoRetry,
int autoRetryDelay,
ODistributedStorageEventListener eventListener,
ODistributedTxContext reqContext)
throws InterruptedException
InterruptedExceptionpublic static void acquireMultipleRecordLocks(Object iThis, ODistributedServerManager dManager, ODistributedDatabase localDistributedDatabase, List<com.orientechnologies.orient.core.id.ORecordId> recordsToLock, int maxAutoRetry, int autoRetryDelay, ODistributedStorageEventListener eventListener, ODistributedTxContext reqContext, long timeout) throws InterruptedException
InterruptedExceptionprotected List<OAbstractRemoteTask> createUndoTasksFromTx(com.orientechnologies.orient.core.tx.OTransaction iTx)
iTx - Current transactionprotected boolean processCommitResult(String localNodeName, com.orientechnologies.orient.core.tx.OTransaction iTx, OTxTask txTask, Set<String> involvedClusters, Iterable<com.orientechnologies.orient.core.db.record.ORecordOperation> tmpEntries, Collection<String> nodes, int autoRetryDelay, ODistributedRequestId reqId, ODistributedResponse dResponse, boolean isLastRetry) throws InterruptedException
InterruptedExceptionCopyright © 2009–2017 OrientDB. All rights reserved.