org.openanzo.model
Interface ITransactionManager

All Known Subinterfaces:
ITransactionQueueManager
All Known Implementing Classes:
TransactionManager, TransactionQueueManager

public interface ITransactionManager

Transaction Manager for INamedGraphs and IContainers

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Method Summary
 void abort()
          Abort the current transaction
 void begin()
          Begin a transaction, blocking if another thread already started a transaction
 void beginNonBlocking()
          Begin a transaction
 void commit()
          Commit the current transaction
 boolean currentThreadOwnsTransaction()
          Return whether the current thread owns the TransactionQueue lock
 boolean isInTransaction()
          Get whether or not a transaction has begun.
 

Method Detail

beginNonBlocking

void beginNonBlocking()
                      throws AnzoException
Begin a transaction

Throws:
AnzoException - if another thread already started a transaction

begin

void begin()
           throws AnzoException
Begin a transaction, blocking if another thread already started a transaction

Throws:
AnzoException

commit

void commit()
            throws AnzoException
Commit the current transaction

Throws:
AnzoException - if another thread started the transaction or if no transaction is in started

abort

void abort()
           throws AnzoException
Abort the current transaction

Throws:
AnzoException - if another thread started the transaction or if no transaction is in started

isInTransaction

boolean isInTransaction()
Get whether or not a transaction has begun.

Returns:
true if a transaction has begun

currentThreadOwnsTransaction

boolean currentThreadOwnsTransaction()
Return whether the current thread owns the TransactionQueue lock

Returns:
true if within a transaction and current thread started it


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.