public class LocalTxInvocationContext extends AbstractTxInvocationContext<LocalTransaction>
| Constructor and Description |
|---|
LocalTxInvocationContext(LocalTransaction localTransaction) |
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<IracMetadata> |
getIracMetadata(Object key) |
Collection<Address> |
getRemoteLocksAcquired() |
Transaction |
getTransaction()
Returns the tx associated with the current thread.
|
boolean |
hasIracMetadata(Object key) |
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) |
void |
storeIracMetadata(Object key,
CompletionStage<IracMetadata> metadata)
Stores the
IracMetadata associated with key. |
addAffectedKey, addAllAffectedKeys, addLockedKey, clearLockedKeys, getAffectedKeys, getCacheTransaction, getGlobalTransaction, getLockedKeys, getLockOwner, getLookedUpEntries, getModifications, hasModifications, isInTxScope, lookupEntry, putLookedUpEntry, removeLookedUpEntry, setLockOwnerclone, getOrigin, isEntryRemovedInContextequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLockedKeys, clone, getOrigin, isEntryRemovedInContextforEachEntry, forEachValue, lookedUpEntriesCount, removeLookedUpEntriespublic LocalTxInvocationContext(LocalTransaction localTransaction)
public final boolean isTransactionValid()
public final boolean isImplicitTransaction()
public final boolean isOriginLocal()
InvocationContextisOriginLocal in interface InvocationContextisOriginLocal in class AbstractInvocationContextpublic final boolean hasLockedKey(Object key)
InvocationContexthasLockedKey in interface InvocationContexthasLockedKey in class AbstractInvocationContextkey - lock to testpublic final void remoteLocksAcquired(Collection<Address> nodes)
public final Collection<Address> getRemoteLocksAcquired()
public final Transaction getTransaction()
TxInvocationContextInvocationContext.isOriginLocal(), as Transaction are not propagated from the node where tx was
started.public boolean hasIracMetadata(Object key)
true if there is an IracMetadata stored for key.public void storeIracMetadata(Object key, CompletionStage<IracMetadata> metadata)
IracMetadata associated with key.key - The key.metadata - The CompletionStage that will be completed with IracMetadata to associate.public CompletionStage<IracMetadata> getIracMetadata(Object key)
IracMetadata associated with key.Copyright © 2021 JBoss by Red Hat. All rights reserved.