|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITransactionQueue
The ITransactionQueue contains a queue of ITransactions. Events are sent to listeners when actions occur on the queue.
| Method Summary | |
|---|---|
void |
abortCurrentTransaction()
Abort the currentTransaction and set currentTransaction to null; |
void |
addTransactionQueueListener(ITransactionQueueListener listener)
Add a new listener for TransactionQueue Events. |
void |
clear()
Clear all transactions from the queue and set currentTransaction to null. |
ITransaction |
getCurrentTransaction(boolean create)
Get the currentTransaction, creating one if null and create flag is true. |
int |
getSize()
Get the number of transaction in the queue |
java.util.List<ITransaction> |
getTransactions()
Get a list containing the transactions in the queue |
void |
push(ITransaction transaction,
boolean saveTransaction)
Push a transaction onto the queue, this will commit the currentTransaction if not null. |
void |
queueCurrentTransaction()
Queue the currentTransaction. |
void |
removeTransactionHandler()
Remove the TransactionQueue handler. |
void |
removeTransactionQueueListener(ITransactionQueueListener listener)
Remove a TransactionQueue listener. |
void |
setTransactionHandler(ITransactionQueueHandler handler)
Set the TransactionQueue Events. |
void |
transactionsCommitted(ITransaction[] transactions,
boolean[] commitResults,
java.util.List<AnzoException>[] errors)
Notify the queue that a set of transactions were committed successfully. |
| Method Detail |
|---|
void abortCurrentTransaction()
void clear()
throws AnzoException
AnzoException - if there was an error clearing the transaction queueint getSize()
java.util.List<ITransaction> getTransactions()
void push(ITransaction transaction,
boolean saveTransaction)
throws AnzoException
transaction - Transaction to push onto queue.saveTransaction - Whether this transaction needs to be persisted when added. If loading persisted transactions, they might only
need to added, and not saved.
AnzoException
void queueCurrentTransaction()
throws AnzoException
AnzoException
ITransaction getCurrentTransaction(boolean create)
throws AnzoException
create - Whether to create a new transaction if currentTransaction is null.
AnzoException - if there was an error fetching or creating the current transactionvoid setTransactionHandler(ITransactionQueueHandler handler)
handler - that handles TransactionQueue eventsvoid removeTransactionHandler()
void addTransactionQueueListener(ITransactionQueueListener listener)
listener - that handles eventsvoid removeTransactionQueueListener(ITransactionQueueListener listener)
listener - that handles events
void transactionsCommitted(ITransaction[] transactions,
boolean[] commitResults,
java.util.List<AnzoException>[] errors)
throws AnzoException
transactions - The transaction that were committed.commitResults - Array of booleans signifying if the corresponding transaction was committed successfullyerrors - Array of errors for the corresponding transaction if transaction failed to commit successfully
AnzoException - if there was an error processing the committed transactions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||