public interface IDistributedTransactionService extends ITransactionService
IBigdataFederation.| Modifier and Type | Method and Description |
|---|---|
boolean |
committed(long tx,
UUID dataService)
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
IDataService. |
void |
declareResources(long tx,
UUID dataService,
String[] resource)
An
IDataService MUST 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). |
long |
prepared(long tx,
UUID dataService)
Callback by an
IDataService participating in a two phase commit
for a distributed transaction. |
abort, commit, getLastCommitTime, getReleaseTime, newTx, notifyCommitnextTimestampdestroy, getHostname, getServiceIface, getServiceName, getServiceUUIDvoid declareResources(long tx,
UUID dataService,
String[] resource)
throws IOException
IDataService MUST 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.dataService - The UUID an IDataService on 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
IDataService).IOExceptionlong prepared(long tx,
UUID dataService)
throws IOException,
InterruptedException,
BrokenBarrierException
IDataService participating in a two phase commit
for a distributed transaction. The ITransactionService will wait
until all IDataServices have prepared. It will then choose a
commitTime for the transaction and return that value to each
IDataService.
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.
tx - The transaction identifier.dataService - The UUID of the IDataService which sent the
message.InterruptedExceptionBrokenBarrierExceptionIOException - if there is an RMI problem.boolean committed(long tx,
UUID dataService)
throws IOException,
InterruptedException,
BrokenBarrierException
IDataService. If this method
returns false then the distributed commit has failed and
the task MUST rollback the live journal to the previous commit point. If
the return is true then the distributed commit was
successful and the task should halt permitting the IDataService
to return from the ITxCommitProtocol.prepare(long, long) method.tx - The transaction identifier.dataService - The UUID of the IDataService which sent the
message.true if the distributed commit was successfull and
false if there was a problem.IOExceptionInterruptedExceptionBrokenBarrierExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.