public class LocalTxInvocationContext extends AbstractTxInvocationContext
| Modifier and Type | Field and Description |
|---|---|
Map<Object,CacheEntry> |
emptyEntryMap |
| Constructor and Description |
|---|
LocalTxInvocationContext(Equivalence<Object> keyEq) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLockedKey(Object key)
Tracks the given key as locked by this invocation context.
|
AbstractCacheTransaction |
getCacheTransaction() |
GlobalTransaction |
getGlobalTransaction()
Returns the id of the transaction associated with the current call.
|
Set<Object> |
getLockedKeys()
Returns the set of keys that are locked for writing.
|
Object |
getLockOwner()
Returns the in behalf of which locks will be aquired.
|
Map<Object,CacheEntry> |
getLookedUpEntries()
Retrieves a map of entries looked up within the current scope.
|
List<WriteCommand> |
getModifications()
Returns the modifications performed in the scope of the current transaction.
|
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 |
isOriginLocal()
Returns true if the call was originated locally, false if it is the result of a remote rpc.
|
boolean |
isTransactionValid() |
CacheEntry |
lookupEntry(Object key)
Retrieves an entry from the collection of looked up entries in the current scope.
|
void |
putLookedUpEntry(Object key,
CacheEntry e)
Puts an entry in the registry of looked up entries in the current scope.
|
void |
remoteLocksAcquired(Collection<Address> nodes) |
void |
removeLookedUpEntry(Object key) |
void |
setLocalTransaction(LocalTransaction localTransaction) |
boolean |
skipTransactionCompleteCheck() |
void |
skipTransactionCompleteCheck(boolean skip) |
addAffectedKey, addAllAffectedKeys, clearLockedKeys, getAffectedKeys, hasModifications, isImplicitTransaction, isInTxScope, onEntryValueReplaced, setImplicitTransaction, setTransactionclone, getClassLoader, getOrigin, isEntryRemovedInContext, replaceValue, setClassLoader, setOrigin, setOriginLocalequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, getClassLoader, getOrigin, isEntryRemovedInContext, replaceValue, setClassLoaderpublic final Map<Object,CacheEntry> emptyEntryMap
public LocalTxInvocationContext(Equivalence<Object> keyEq)
public boolean isTransactionValid()
public boolean isOriginLocal()
InvocationContextisOriginLocal in interface InvocationContextisOriginLocal in class AbstractInvocationContextpublic Object getLockOwner()
InvocationContextpublic GlobalTransaction getGlobalTransaction()
TxInvocationContextpublic List<WriteCommand> getModifications()
TxInvocationContextpublic void setLocalTransaction(LocalTransaction localTransaction)
public CacheEntry lookupEntry(Object key)
EntryLookupkey - key to look uppublic Map<Object,CacheEntry> getLookedUpEntries()
EntryLookuppublic void putLookedUpEntry(Object key, CacheEntry e)
EntryLookupkey - key to storee - entry to storepublic void removeLookedUpEntry(Object key)
public boolean hasLockedKey(Object key)
InvocationContexthasLockedKey in interface InvocationContexthasLockedKey in class AbstractInvocationContextkey - lock to testpublic void remoteLocksAcquired(Collection<Address> nodes)
public Collection<Address> getRemoteLocksAcquired()
public AbstractCacheTransaction getCacheTransaction()
getCacheTransaction in interface TxInvocationContextgetCacheTransaction in class AbstractTxInvocationContextpublic void skipTransactionCompleteCheck(boolean skip)
public boolean skipTransactionCompleteCheck()
public Set<Object> getLockedKeys()
InvocationContextpublic void addLockedKey(Object key)
InvocationContextpublic Transaction getTransaction()
TxInvocationContextInvocationContext.isOriginLocal(), as Transaction are not propagated from the node where tx was
started.getTransaction in interface TxInvocationContextgetTransaction in class AbstractTxInvocationContextCopyright © 2014 JBoss, a division of Red Hat. All rights reserved.