public class LocalTxInvocationContext extends AbstractTxInvocationContext<LocalTransaction>
Constructor and Description |
---|
LocalTxInvocationContext(LocalTransaction localTransaction) |
Modifier and Type | Method and Description |
---|---|
Collection<Address> |
getRemoteLocksAcquired() |
Transaction |
getTransaction()
Returns the tx associated with the current thread.
|
boolean |
hasLockedKey(Object key)
Returns true if the lock being tested is already held in the current scope, false otherwise.
|
boolean |
isImplicitTransaction() |
boolean |
isOriginLocal()
Returns true if the call was originated locally, false if it is the result of a remote rpc.
|
boolean |
isTransactionValid() |
void |
remoteLocksAcquired(Collection<Address> nodes) |
addAffectedKey, addAllAffectedKeys, addLockedKey, clearLockedKeys, getAffectedKeys, getCacheTransaction, getGlobalTransaction, getLockedKeys, getLockOwner, getLookedUpEntries, getModifications, hasModifications, isInTxScope, lookupEntry, putLookedUpEntry, removeLookedUpEntry, setLockOwner
clone, getClassLoader, getOrigin, isEntryRemovedInContext, onEntryValueReplaced, setClassLoader
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, getClassLoader, getOrigin, isEntryRemovedInContext, replaceValue, setClassLoader
public LocalTxInvocationContext(LocalTransaction localTransaction)
public final boolean isTransactionValid()
public final boolean isImplicitTransaction()
public final boolean isOriginLocal()
InvocationContext
isOriginLocal
in interface InvocationContext
isOriginLocal
in class AbstractInvocationContext
public final boolean hasLockedKey(Object key)
InvocationContext
hasLockedKey
in interface InvocationContext
hasLockedKey
in class AbstractInvocationContext
key
- lock to testpublic final void remoteLocksAcquired(Collection<Address> nodes)
public final Collection<Address> getRemoteLocksAcquired()
public final Transaction getTransaction()
TxInvocationContext
InvocationContext.isOriginLocal()
, as Transaction
are not propagated from the node where tx was
started.Copyright © 2021 JBoss, a division of Red Hat. All rights reserved.