public final class SynchronizedTransactions extends Transactions
Transactions
that will attempt to register a Synchronization
with the current transaction.Modifier and Type | Class and Description |
---|---|
protected class |
SynchronizedTransactions.RollbackOnlyTransaction |
protected class |
SynchronizedTransactions.SynchronizedTransaction |
protected class |
SynchronizedTransactions.TransactionListener
An Infinispan transaction listener which will be invoked each time a transaction completes.
|
protected class |
SynchronizedTransactions.TransactionTracer |
Transactions.BaseTransaction, Transactions.NestableThreadLocalTransaction, Transactions.SimpleTransaction, Transactions.TraceableSimpleTransaction, Transactions.Transaction, Transactions.TransactionFunction
Modifier and Type | Field and Description |
---|---|
protected static Set<String> |
ACTIVE_TRACE_SYNCHRONIZATIONS |
logger, txnMgr
Constructor and Description |
---|
SynchronizedTransactions(TransactionManager txnMgr,
Cache localCache)
Creates a new instance which wraps a transaction manager and monitor factory
|
Modifier and Type | Method and Description |
---|---|
Transactions.Transaction |
begin()
Starts a new transaction if one does not already exist, and associate it with the calling thread.
|
protected SynchronizedTransactions.SynchronizedTransaction |
clearActiveTx(long ispnTxId) |
Transactions.Transaction |
currentTransaction()
Returns a the current ModeShape transaction, if one exists.
|
protected boolean |
hasTxFor(long ispnTxId) |
void |
updateCache(WorkspaceCache workspace,
ChangeSet changes,
Transactions.Transaction transaction)
Notify the workspace of the supplied changes, if and when the current transaction is completed.
|
currentTransactionId, getTransactionManager, isCurrentlyInTransaction, resume, suspend
public SynchronizedTransactions(TransactionManager txnMgr, Cache localCache)
txnMgr
- a TransactionManager
instance; never nulllocalCache
- a Cache
instance representing the main ISPN cachepublic Transactions.Transaction currentTransaction()
Transactions
currentTransaction
in class Transactions
instance
or null
public Transactions.Transaction begin() throws NotSupportedException, SystemException
Transactions
begin
in class Transactions
NotSupportedException
- If the calling thread is already associated with a transaction, and nested transactions are
not supported.SystemException
- If the transaction service fails in an unexpected way.protected SynchronizedTransactions.SynchronizedTransaction clearActiveTx(long ispnTxId)
protected boolean hasTxFor(long ispnTxId)
public void updateCache(WorkspaceCache workspace, ChangeSet changes, Transactions.Transaction transaction)
Transactions
updateCache
in class Transactions
workspace
- the workspace to which the changes were made; may not be nullchanges
- the changes; may be null if there are no changestransaction
- the transaction with which the changes were made; may not be nullCopyright © 2008-2015 JBoss, a division of Red Hat. All Rights Reserved.