public class TransactionalInvocationContextFlagsOverride extends InvocationContextFlagsOverride implements TxInvocationContext
InvocationContextFlagsOverride| Constructor and Description |
|---|
TransactionalInvocationContextFlagsOverride(TxInvocationContext delegate,
Set<Flag> flags) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAffectedKey(Object key) |
void |
addAllAffectedKeys(Collection<Object> keys)
Registers a new participant with the transaction.
|
Set<Object> |
getAffectedKeys()
Returns the set of keys that are affected by this transaction.
|
CacheTransaction |
getCacheTransaction() |
GlobalTransaction |
getGlobalTransaction()
Returns the id of the transaction associated with the current call.
|
List<WriteCommand> |
getModifications()
Returns all the modifications performed in the scope of the current transaction.
|
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 |
isTransactionValid() |
void |
setImplicitTransaction(boolean implicit)
Marks this transaction as implicit; implicit transactions are started for transactional caches that have the autoCommit enabled.
|
addLockedKey, clearLockedKeys, clearLookedUpEntries, clone, getClassLoader, getFlags, getLockedKeys, getLockOwner, getLookedUpEntries, getOrigin, hasFlag, hasLockedKey, isInTxScope, isOriginLocal, isUseFutureReturnType, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry, reset, setClassLoader, setFlags, setFlags, setUseFutureReturnTypeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLockedKey, clearLockedKeys, clone, getClassLoader, getLockedKeys, getLockOwner, getOrigin, hasLockedKey, isInTxScope, isOriginLocal, isUseFutureReturnType, setClassLoader, setUseFutureReturnTypeclearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntrypublic TransactionalInvocationContextFlagsOverride(TxInvocationContext delegate, Set<Flag> flags)
public boolean hasModifications()
TxInvocationContexthasModifications in interface TxInvocationContextpublic Set<Object> getAffectedKeys()
TxInvocationContextgetAffectedKeys in interface TxInvocationContextpublic GlobalTransaction getGlobalTransaction()
TxInvocationContextgetGlobalTransaction in interface TxInvocationContextpublic List<WriteCommand> getModifications()
TxInvocationContextgetModifications in interface TxInvocationContextpublic void addAllAffectedKeys(Collection<Object> keys)
TxInvocationContextaddAllAffectedKeys in interface TxInvocationContextpublic Transaction getTransaction()
TxInvocationContextInvocationContext.isOriginLocal(), as Transaction are not propagated from the node where tx was
started.getTransaction in interface TxInvocationContextpublic boolean isTransactionValid()
isTransactionValid in interface TxInvocationContextpublic void setImplicitTransaction(boolean implicit)
TxInvocationContextsetImplicitTransaction in interface TxInvocationContextpublic boolean isImplicitTransaction()
isImplicitTransaction in interface TxInvocationContextpublic CacheTransaction getCacheTransaction()
getCacheTransaction in interface TxInvocationContextpublic void addAffectedKey(Object key)
addAffectedKey in interface TxInvocationContextCopyright © 2012 JBoss by Red Hat. All Rights Reserved.