|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionIDFactory
A factory for transaction IDs. Generated transaction ID's must be unique to the entire cluster-wide CacheManager.
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 |
Method Detail |
---|
TransactionID createTransactionID()
TransactionID restoreTransactionID(TransactionIDSerializedForm serializedForm)
serializedForm
- the TransactionID serialized form
XidTransactionID createXidTransactionID(Xid xid, Ehcache cache)
xid
- the XID
XidTransactionID restoreXidTransactionID(XidTransactionIDSerializedForm serializedForm)
serializedForm
- the XidTransactionID serialized form
void markForCommit(TransactionID transactionID)
transactionID
- transaction to be markedvoid markForRollback(XidTransactionID transactionID)
boolean isDecisionCommit(TransactionID transactionID)
transactionID
- transaction to be queried
void clear(TransactionID transactionID)
transactionID
- transaction to be clearedSet<XidTransactionID> getAllXidTransactionIDsFor(Ehcache cache)
Set<TransactionID> getAllTransactionIDs()
Boolean isPersistent()
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
true
is state is persistentboolean isExpired(TransactionID transactionID)
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |