|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ehcache.transactions.xa.journal.TransientJournal<K>
public class TransientJournal<K>
An in-memory only Journal implementation.
| Nested Class Summary | |
|---|---|
protected static class |
TransientJournal.Entry<K>
|
| Field Summary | |
|---|---|
protected ConcurrentHashMap<TransactionId,TransientJournal.Entry<K>> |
states
|
| Constructor Summary | |
|---|---|
TransientJournal()
|
|
| Method Summary | |
|---|---|
void |
close()
Close the journal. |
void |
forget(TransactionId transactionId)
Forget a transaction that was terminated upon a heuristic decision. |
java.util.Collection<K> |
getInDoubtKeys(TransactionId transactionId)
Get a Collection of keys modified by a transaction still in-doubt. |
java.util.Map<TransactionId,java.lang.Boolean> |
heuristicDecisions()
Recover the state of all transactions that were terminated upon a heuristic decision. |
boolean |
isHeuristicallyTerminated(TransactionId transactionId)
Check if a transaction has been terminated by a heuristic decision. |
boolean |
isInDoubt(TransactionId transactionId)
Check if a transaction has been saved as in-doubt. |
void |
open()
Open the journal. |
java.util.Map<TransactionId,java.util.Collection<K>> |
recover()
Recover the state of all in-doubt transactions. |
void |
saveCommitted(TransactionId transactionId,
boolean heuristicDecision)
Save that a transaction has committed. |
void |
saveInDoubt(TransactionId transactionId,
java.util.Collection<K> inDoubtKeys)
Save that a transaction is in-doubt. |
void |
saveRolledBack(TransactionId transactionId,
boolean heuristicDecision)
Save that a transaction has rolled back. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ConcurrentHashMap<TransactionId,TransientJournal.Entry<K>> states
| Constructor Detail |
|---|
public TransientJournal()
| Method Detail |
|---|
public void saveCommitted(TransactionId transactionId,
boolean heuristicDecision)
Journal
saveCommitted in interface Journal<K>transactionId - the ID of the transaction.heuristicDecision - true if the state change is being done upon a heuristic decision.
public void saveRolledBack(TransactionId transactionId,
boolean heuristicDecision)
Journal
saveRolledBack in interface Journal<K>transactionId - the ID of the transaction.heuristicDecision - true if the state change is being done upon a heuristic decision.
public void saveInDoubt(TransactionId transactionId,
java.util.Collection<K> inDoubtKeys)
Journal
saveInDoubt in interface Journal<K>transactionId - the ID of the transaction.inDoubtKeys - a Collection of keys modified by the transaction.public boolean isInDoubt(TransactionId transactionId)
Journal
isInDoubt in interface Journal<K>transactionId - the ID of the transaction.
public java.util.Collection<K> getInDoubtKeys(TransactionId transactionId)
JournalCollection of keys modified by a transaction still in-doubt.
getInDoubtKeys in interface Journal<K>transactionId - the ID of the transaction.
Collection of keys modified by the transaction.public java.util.Map<TransactionId,java.util.Collection<K>> recover()
Journal
recover in interface Journal<K>public boolean isHeuristicallyTerminated(TransactionId transactionId)
Journal
isHeuristicallyTerminated in interface Journal<K>transactionId - the ID of the transaction.
public void forget(TransactionId transactionId)
Journal
forget in interface Journal<K>transactionId - the Id of the transaction.public java.util.Map<TransactionId,java.lang.Boolean> heuristicDecisions()
Journal
heuristicDecisions in interface Journal<K>
public void open()
throws java.io.IOException
Journal
open in interface Journal<K>java.io.IOException - if there was an error opening the journal.
public void close()
throws java.io.IOException
Journal
close in interface Journal<K>java.io.IOException - if there was an error closing the journal.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||