com.bigdata.journal
Interface ILocalTransactionManager

All Superinterfaces:
IServiceShutdown
All Known Implementing Classes:
AbstractLocalTransactionManager, DataService.DataServiceTransactionManager

public interface ILocalTransactionManager
extends IServiceShutdown

Interface for managing local transaction state (the client side of the ITransactionService).

Version:
$Id: ILocalTransactionManager.java 4610 2011-06-02 19:58:46Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.bigdata.service.IServiceShutdown
IServiceShutdown.Options
 
Method Summary
 ITransactionService getTransactionService()
          The server side of the transaction manager (possibly remote, in which case this may require the service to be discovered).
 ITx getTx(long tx)
          Return the local state for a transaction.
 long nextTimestamp()
          Return the next timestamp from the ITransactionService.
 void notifyCommit(long commitTime)
          Notify the global transaction manager that a commit has been performed with the given timestamp (which it assigned) and that it should update its lastCommitTime iff the given commitTime is GT its current lastCommitTime.
 
Methods inherited from interface com.bigdata.service.IServiceShutdown
isOpen, shutdown, shutdownNow
 

Method Detail

getTransactionService

ITransactionService getTransactionService()
The server side of the transaction manager (possibly remote, in which case this may require the service to be discovered).


getTx

ITx getTx(long tx)
Return the local state for a transaction.

Parameters:
tx - The transaction identifier.
Returns:
The local state for the identified transaction -or- null if the start time is not mapped to either an active or prepared transaction.

nextTimestamp

long nextTimestamp()
Return the next timestamp from the ITransactionService.

Note: This method is "robust" and will "retry" ITimestampService.nextTimestamp() several times before giving up.

Returns:
The next timestamp assigned by the ITransactionService.
Throws:
RuntimeException - if the service can not be resolved or the timestamp can not be obtained.
See Also:
ITimestampService.nextTimestamp()

notifyCommit

void notifyCommit(long commitTime)
Notify the global transaction manager that a commit has been performed with the given timestamp (which it assigned) and that it should update its lastCommitTime iff the given commitTime is GT its current lastCommitTime.

Parameters:
commitTime - The commit time.
See Also:
ITransactionService.notifyCommit(long)


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.