org.openanzo.model.transaction
Interface ITransactionGraph

All Superinterfaces:
INamedGraph
All Known Implementing Classes:
TransactionNamedGraphProxy

public interface ITransactionGraph
extends INamedGraph

ITransactionGraph is a graph whose transactions are handled by a transaction queue. These functions are encapsulated by an enhanced TransactionHandler, an ITransactionQueueManager.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Method Summary
 boolean commitTransactionQueue()
          Commit the transaction queue.
 ITransactionQueueManager getTransactionQueueManager()
          Get the ITransactionQueueManager for this graph.
 boolean processTransactions(java.util.List<ITransaction> queue)
          Process a list of transactions, most commonly from another ITransactionGraph.
 void redo()
          Redo the last command in the current transaction.
 void undo()
          Undo the last command in the current transaction.
 
Methods inherited from interface org.openanzo.model.INamedGraph
add, add, add, clear, close, contains, contains, delete, delete, delete, find, getEventManager, getNamedGraphUri, getStatements, getTransactionManager, isClosed, isEmpty, setNamedGraphUri, size
 

Method Detail

getTransactionQueueManager

ITransactionQueueManager getTransactionQueueManager()
Get the ITransactionQueueManager for this graph.

Returns:
the ITransactionQueueManager for this graph.

processTransactions

boolean processTransactions(java.util.List<ITransaction> queue)
Process a list of transactions, most commonly from another ITransactionGraph. Useful when applying transactions from different graph types in order to filter or transform the format of the triples from one graph to another.

Parameters:
queue - List of transactions to apply to local queue.
Returns:
Whether or not processing of list was successful.

commitTransactionQueue

boolean commitTransactionQueue()
                               throws java.lang.Throwable
Commit the transaction queue.

Returns:
if committing was successful
Throws:
java.lang.Throwable

undo

void undo()
          throws AnzoException
Undo the last command in the current transaction.

Throws:
AnzoException - if there was an error undoing last command on graph

redo

void redo()
          throws AnzoException
Redo the last command in the current transaction.

Throws:
AnzoException - if there was an error undoing last command on graph


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