public abstract class AbstractTxInvocationContext extends AbstractInvocationContext implements TxInvocationContext
TxInvocationContext
.Constructor and Description |
---|
AbstractTxInvocationContext() |
Modifier and Type | Method and Description |
---|---|
void |
addAffectedKey(Object key) |
void |
addAllAffectedKeys(Collection<Object> keys)
Registers a new participant with the transaction.
|
void |
clearLockedKeys() |
Set<Object> |
getAffectedKeys()
Returns the set of keys that are affected by this transaction.
|
abstract AbstractCacheTransaction |
getCacheTransaction() |
Transaction |
getTransaction()
Returns the tx associated with the current thread.
|
boolean |
hasModifications()
Checks if there are modifications performed within the tx's scope.
|
boolean |
isImplicitTransaction() |
boolean |
isInTxScope()
Returns true if this call is performed in the context of an transaction, false otherwise.
|
protected void |
onEntryValueReplaced(Object key,
InternalCacheEntry cacheEntry) |
void |
setImplicitTransaction(boolean implicit)
Marks this transaction as implicit; implicit transactions are started for transactional caches that have the autoCommit enabled.
|
TxInvocationContext |
setTransaction(Transaction transaction) |
clone, getClassLoader, getOrigin, hasLockedKey, isEntryRemovedInContext, isOriginLocal, replaceValue, setClassLoader, setOrigin, setOriginLocal
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGlobalTransaction, getModifications, isTransactionValid, skipTransactionCompleteCheck, skipTransactionCompleteCheck
addLockedKey, clone, getClassLoader, getLockedKeys, getLockOwner, getOrigin, hasLockedKey, isEntryRemovedInContext, isOriginLocal, replaceValue, setClassLoader
getLookedUpEntries, lookupEntry, putLookedUpEntry, removeLookedUpEntry
public boolean hasModifications()
TxInvocationContext
hasModifications
in interface TxInvocationContext
public Set<Object> getAffectedKeys()
TxInvocationContext
getAffectedKeys
in interface TxInvocationContext
public void addAllAffectedKeys(Collection<Object> keys)
TxInvocationContext
addAllAffectedKeys
in interface TxInvocationContext
public void addAffectedKey(Object key)
addAffectedKey
in interface TxInvocationContext
public void setImplicitTransaction(boolean implicit)
TxInvocationContext
setImplicitTransaction
in interface TxInvocationContext
public boolean isImplicitTransaction()
isImplicitTransaction
in interface TxInvocationContext
public boolean isInTxScope()
InvocationContext
isInTxScope
in interface InvocationContext
public TxInvocationContext setTransaction(Transaction transaction)
public Transaction getTransaction()
TxInvocationContext
InvocationContext.isOriginLocal()
, as Transaction
are not propagated from the node where tx was
started.getTransaction
in interface TxInvocationContext
public final void clearLockedKeys()
clearLockedKeys
in interface InvocationContext
protected void onEntryValueReplaced(Object key, InternalCacheEntry cacheEntry)
onEntryValueReplaced
in class AbstractInvocationContext
public abstract AbstractCacheTransaction getCacheTransaction()
getCacheTransaction
in interface TxInvocationContext
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.