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, setLockOwner
clone, getOrigin, isEntryRemovedInContext
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addLockedKeys, clone, getOrigin, isEntryRemovedInContext
forEachEntry, forEachValue, lookedUpEntriesCount, removeLookedUpEntries
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.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.