org.openanzo.model.transaction.impl
Class TransactionQueueManager

java.lang.Object
  extended by org.openanzo.model.transaction.impl.TransactionManager
      extended by org.openanzo.model.transaction.impl.TransactionQueueManager
All Implemented Interfaces:
ITransactionManager, ITransactionQueueManager

public class TransactionQueueManager
extends TransactionManager
implements ITransactionQueueManager

Standard implementation of the ITransactionQueueManager

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
TransactionQueueManager()
          Create new TransactionQueueManager
TransactionQueueManager(ITransactionQueue transactionQueue)
          Create new TransactionQueueManager with provided TransactionQueue
 
Method Summary
 java.lang.Object executeInTransaction(Command c)
          Execute a command within a transaction, where the Command becomes on ICommand within the ITransaction.
 void executeInTransaction(CommandChain commands)
          Execute a CommandChain within a transaction, where each Command within chain becomes on ICommand within the ITransaction.
 void filter(java.util.Collection<org.openrdf.model.Statement> results, org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource... context)
          Filter a set of statements with the ITransaction and ICommands within the ITransactionQueue.
 ITransactionQueue getTransactionQueue()
          Get the TransactionQueue for the manager
 void performAbort()
          Perform internal processes needed to abort the current transaction
 void performBegin()
          Perform internal processes needed to begin a new transaction
 void performCommit()
          Perform internal processes needed to commit the current transaction
 
Methods inherited from class org.openanzo.model.transaction.impl.TransactionManager
abort, begin, beginNonBlocking, commit, currentThreadOwnsTransaction, isInTransaction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openanzo.model.ITransactionManager
abort, begin, beginNonBlocking, commit, currentThreadOwnsTransaction, isInTransaction
 

Constructor Detail

TransactionQueueManager

public TransactionQueueManager()
Create new TransactionQueueManager


TransactionQueueManager

public TransactionQueueManager(ITransactionQueue transactionQueue)
Create new TransactionQueueManager with provided TransactionQueue

Parameters:
transactionQueue - on which this manager operates
Method Detail

performAbort

public void performAbort()
                  throws AnzoException
Description copied from class: TransactionManager
Perform internal processes needed to abort the current transaction

Specified by:
performAbort in class TransactionManager
Throws:
AnzoException - if there was an error aborting transaction

performBegin

public void performBegin()
                  throws AnzoException
Description copied from class: TransactionManager
Perform internal processes needed to begin a new transaction

Specified by:
performBegin in class TransactionManager
Throws:
AnzoException - if there was an error beginning a transaction

performCommit

public void performCommit()
                   throws AnzoException
Description copied from class: TransactionManager
Perform internal processes needed to commit the current transaction

Specified by:
performCommit in class TransactionManager
Throws:
AnzoException - if there was an error committing transaction

getTransactionQueue

public ITransactionQueue getTransactionQueue()
Description copied from interface: ITransactionQueueManager
Get the TransactionQueue for the manager

Specified by:
getTransactionQueue in interface ITransactionQueueManager
Returns:
the TransactionQueue for the manager.

executeInTransaction

public void executeInTransaction(CommandChain commands)
                          throws AnzoException
Description copied from interface: ITransactionQueueManager
Execute a CommandChain within a transaction, where each Command within chain becomes on ICommand within the ITransaction.

Specified by:
executeInTransaction in interface ITransactionQueueManager
Parameters:
commands - commandChain to execute *
Throws:
AnzoException - if there was an error executing commandChain

executeInTransaction

public java.lang.Object executeInTransaction(Command c)
                                      throws AnzoException
Description copied from interface: ITransactionQueueManager
Execute a command within a transaction, where the Command becomes on ICommand within the ITransaction.

Specified by:
executeInTransaction in interface ITransactionQueueManager
Parameters:
c - command to execute
Returns:
result of executing command
Throws:
AnzoException - if there was an error executing command

filter

public void filter(java.util.Collection<org.openrdf.model.Statement> results,
                   org.openrdf.model.Resource s,
                   org.openrdf.model.URI p,
                   org.openrdf.model.Value o,
                   org.openrdf.model.Resource... context)
Description copied from interface: ITransactionQueueManager
Filter a set of statements with the ITransaction and ICommands within the ITransactionQueue.

Specified by:
filter in interface ITransactionQueueManager
Parameters:
results - The collection to overlay with the additions and deletions within this transaction.
s - The subject of the statement pattern being searched on.
p - The property of the statement pattern being searched on.
o - The object of the statement pattern being searched on.
context - The contexts of the statement pattern being searched on.


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