|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.util.journal.TransactionJournal<T,K>
public class TransactionJournal<T,K extends JournalEntry<T>>
Keeps track of transactional operation made over a transactional resource. Uses two files for keeping track of the transactions and empties a file once all the entries in such file are resolved. Keeps a memory cache of the log entries for performance reasons. Once a transaction finishes the client of this class must manually remove the entries related to such transaction to clear the cache.
| Constructor Summary | |
|---|---|
TransactionJournal(String logFilesDirectory,
TransactionCompletePredicate transactionCompletePredicate,
JournalEntrySerializer journalEntrySerializer)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all the entries from the transactionl jorunal |
void |
close()
Release the resources used by the transaction journal |
com.google.common.collect.Multimap<T,K> |
getAllLogEntries()
|
Collection<K> |
getLogEntriesForTx(T txId)
|
void |
logCheckpointOperation(JournalEntry<T> journalEntry)
Logs a checkpoint operation over the transactions. |
void |
logUpdateOperation(JournalEntry<T> journalEntry)
Log an update operation over a transactional resource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionJournal(String logFilesDirectory,
TransactionCompletePredicate transactionCompletePredicate,
JournalEntrySerializer journalEntrySerializer)
logFilesDirectory - directory used to store the journal files.| Method Detail |
|---|
public void logUpdateOperation(JournalEntry<T> journalEntry)
journalEntry - journal entry with the update operation detailspublic void logCheckpointOperation(JournalEntry<T> journalEntry)
journalEntry - journal entry with the checkpoint operation detailspublic Collection<K> getLogEntriesForTx(T txId)
txId - transaction identifier
public com.google.common.collect.Multimap<T,K> getAllLogEntries()
public void close()
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||