|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.transaction.DelegatingTransactionIDFactory
public class DelegatingTransactionIDFactory
A TransactionIDFactory implementation with delegates calls to either a clustered or non-clustered factory
Constructor Summary | |
---|---|
DelegatingTransactionIDFactory(FeaturesManager featuresManager,
TerracottaClient terracottaClient,
String cacheManagerName)
Create a new DelegatingTransactionIDFactory |
Method Summary | |
---|---|
void |
clear(TransactionID transactionID)
Clear this transaction's state representation. |
TransactionID |
createTransactionID()
Create a unique transaction ID |
XidTransactionID |
createXidTransactionID(Xid xid,
Ehcache cache)
Create a transaction ID based on a XID for uniqueness |
Set<TransactionID> |
getAllTransactionIDs()
Get the set of all known transactions. |
Set<XidTransactionID> |
getAllXidTransactionIDsFor(Ehcache cache)
Get the set of all XID transactions of a cache. |
boolean |
isDecisionCommit(TransactionID transactionID)
Check if the given transaction should be committed or not |
boolean |
isExpired(TransactionID transactionID)
Check if the transaction ID expired, ie: that the transaction died abnormally |
Boolean |
isPersistent()
Return true if the factory state is persistent (survives JVM restart). |
void |
markForCommit(TransactionID transactionID)
Mark that this transaction's decision is commit |
void |
markForRollback(XidTransactionID transactionID)
Mark this transaction ID for rollback |
TransactionID |
restoreTransactionID(TransactionIDSerializedForm serializedForm)
Restore a transaction ID from its serialized form |
XidTransactionID |
restoreXidTransactionID(XidTransactionIDSerializedForm serializedForm)
Restore a XID transaction ID from its serialized form |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegatingTransactionIDFactory(FeaturesManager featuresManager, TerracottaClient terracottaClient, String cacheManagerName)
terracottaClient
- a terracotta clientcacheManagerName
- the name of the cache manager which creates this.Method Detail |
---|
public TransactionID createTransactionID()
createTransactionID
in interface TransactionIDFactory
public TransactionID restoreTransactionID(TransactionIDSerializedForm serializedForm)
restoreTransactionID
in interface TransactionIDFactory
serializedForm
- the TransactionID serialized form
public XidTransactionID createXidTransactionID(Xid xid, Ehcache cache)
createXidTransactionID
in interface TransactionIDFactory
xid
- the XID
public XidTransactionID restoreXidTransactionID(XidTransactionIDSerializedForm serializedForm)
restoreXidTransactionID
in interface TransactionIDFactory
serializedForm
- the XidTransactionID serialized form
public void markForCommit(TransactionID transactionID)
TransactionIDFactory
markForCommit
in interface TransactionIDFactory
transactionID
- transaction to be markedpublic void markForRollback(XidTransactionID transactionID)
TransactionIDFactory
markForRollback
in interface TransactionIDFactory
public boolean isDecisionCommit(TransactionID transactionID)
TransactionIDFactory
isDecisionCommit
in interface TransactionIDFactory
transactionID
- transaction to be queried
public void clear(TransactionID transactionID)
TransactionIDFactory
clear
in interface TransactionIDFactory
transactionID
- transaction to be clearedpublic Set<XidTransactionID> getAllXidTransactionIDsFor(Ehcache cache)
TransactionIDFactory
getAllXidTransactionIDsFor
in interface TransactionIDFactory
public Set<TransactionID> getAllTransactionIDs()
TransactionIDFactory
getAllTransactionIDs
in interface TransactionIDFactory
public boolean isExpired(TransactionID transactionID)
TransactionIDFactory
isExpired
in interface TransactionIDFactory
public Boolean isPersistent()
TransactionIDFactory
true
if the factory state is persistent (survives JVM restart).
This is a tri-state return:
Boolean.TRUE
: persistentBoolean.FALSE
: not persistentnull
: not yet determined
isPersistent
in interface TransactionIDFactory
true
is state is persistent
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |