public interface IDistributedTransactionService extends ITransactionService
|Modifier and Type||Method and Description|
Sent by a task participating in a distributed commit of a transaction when the task has successfully committed the write set of the transaction on the live journal of the local
Callback by an
abort, commit, getLastCommitTime, getReleaseTime, newTx, notifyCommit
void declareResources(long tx, UUID dataService, String resource) throws IOException
IDataServiceMUST invoke this method before permitting an operation isolated by a read-write transaction to execute with access to the named resources (this applies only to distributed databases). The declared resources are used in the commit phase of the read-write tx to impose a partial order on commits. That partial order guarantees that commits do not deadlock in contention for the same resources.
tx- The transaction identifier.
IDataServiceon which the transaction will write.
resource- An array of the named resources which the transaction will use on that
IDataService(this may be different for each operation submitted by that transaction to the
long prepared(long tx, UUID dataService) throws IOException, InterruptedException, BrokenBarrierException
IDataServiceparticipating in a two phase commit for a distributed transaction. The
ITransactionServicewill wait until all
IDataServices have prepared. It will then choose a commitTime for the transaction and return that value to each
Note: If this method throws ANY exception then the task MUST cancel the commit, discard the local write set of the transaction, and note that the transaction is aborted in its local state.
boolean committed(long tx, UUID dataService) throws IOException, InterruptedException, BrokenBarrierException
IDataService. If this method returns
falsethen the distributed commit has failed and the task MUST rollback the live journal to the previous commit point. If the return is
truethen the distributed commit was successful and the task should halt permitting the
IDataServiceto return from the
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.