Package net.sf.ehcache.transaction
Class AbstractTransactionIDFactory
- java.lang.Object
-
- net.sf.ehcache.transaction.AbstractTransactionIDFactory
-
- All Implemented Interfaces:
TransactionIDFactory
- Direct Known Subclasses:
TransactionIDFactoryImpl
public abstract class AbstractTransactionIDFactory extends java.lang.Object implements TransactionIDFactory
An abstract map backed transaction id factory.- Author:
- Chris Dennis
-
-
Constructor Summary
Constructors Constructor Description AbstractTransactionIDFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear(TransactionID transactionID)Clear this transaction's state representation.java.util.Set<TransactionID>getAllTransactionIDs()Get the set of all known transactions.java.util.Set<XidTransactionID>getAllXidTransactionIDsFor(Ehcache cache)Get the set of all XID transactions of a cache.protected abstract java.util.concurrent.ConcurrentMap<TransactionID,Decision>getTransactionStates()Return the map of transaction states.booleanisDecisionCommit(TransactionID transactionID)Check if the given transaction should be committed or notvoidmarkForCommit(TransactionID transactionID)Mark that this transaction's decision is commitvoidmarkForRollback(XidTransactionID transactionID)Mark this transaction ID for rollback-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.ehcache.transaction.TransactionIDFactory
createTransactionID, createXidTransactionID, isExpired, isPersistent, restoreTransactionID, restoreXidTransactionID
-
-
-
-
Method Detail
-
getTransactionStates
protected abstract java.util.concurrent.ConcurrentMap<TransactionID,Decision> getTransactionStates()
Return the map of transaction states.- Returns:
- the map of transaction states
-
markForCommit
public void markForCommit(TransactionID transactionID)
Mark that this transaction's decision is commit- Specified by:
markForCommitin interfaceTransactionIDFactory- Parameters:
transactionID- transaction to be marked
-
markForRollback
public void markForRollback(XidTransactionID transactionID)
Mark this transaction ID for rollback- Specified by:
markForRollbackin interfaceTransactionIDFactory
-
isDecisionCommit
public boolean isDecisionCommit(TransactionID transactionID)
Check if the given transaction should be committed or not- Specified by:
isDecisionCommitin interfaceTransactionIDFactory- Parameters:
transactionID- transaction to be queried- Returns:
- true if the transaction should be committed
-
clear
public void clear(TransactionID transactionID)
Clear this transaction's state representation.- Specified by:
clearin interfaceTransactionIDFactory- Parameters:
transactionID- transaction to be cleared
-
getAllXidTransactionIDsFor
public java.util.Set<XidTransactionID> getAllXidTransactionIDsFor(Ehcache cache)
Get the set of all XID transactions of a cache.- Specified by:
getAllXidTransactionIDsForin interfaceTransactionIDFactory- Returns:
- the set of transactions
-
getAllTransactionIDs
public java.util.Set<TransactionID> getAllTransactionIDs()
Get the set of all known transactions.- Specified by:
getAllTransactionIDsin interfaceTransactionIDFactory- Returns:
- the set of transactions
-
-