public abstract class AbstractTxInvocationContext extends AbstractInvocationContext implements TxInvocationContext
TxInvocationContext
.AbstractInvocationContext.ContextFlag
contextFlags, flags
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()
Were there any 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.
|
void |
reset() |
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, getFlags, getOrigin, hasFlag, hasLockedKey, isContextFlagSet, isFlagsUninitialized, isUseFutureReturnType, setClassLoader, setContextFlag, setContextFlag, setFlags, setFlags, setOrigin, setUseFutureReturnType, toString, unsetContextFlag
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGlobalTransaction, getModifications, isTransactionValid
addLockedKey, clone, getClassLoader, getLockedKeys, getLockOwner, getOrigin, hasLockedKey, isOriginLocal, isUseFutureReturnType, setClassLoader, setUseFutureReturnType
clearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry
getFlags, hasFlag, setFlags, setFlags
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 void reset()
reset
in interface FlagContainer
reset
in class AbstractInvocationContext
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
public abstract AbstractCacheTransaction getCacheTransaction()
getCacheTransaction
in interface TxInvocationContext
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.