|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.context.impl.AbstractInvocationContext org.infinispan.context.impl.AbstractTxInvocationContext org.infinispan.context.impl.LocalTxInvocationContext
public class LocalTxInvocationContext
Invocation context to be used for locally originated transactions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.infinispan.context.impl.AbstractInvocationContext |
---|
AbstractInvocationContext.ContextFlag |
Field Summary | |
---|---|
static Map<Object,CacheEntry> |
EMPTY_ENTRY_MAP
|
Fields inherited from class org.infinispan.context.impl.AbstractInvocationContext |
---|
contextFlags, flags |
Constructor Summary | |
---|---|
LocalTxInvocationContext()
|
Method Summary | |
---|---|
void |
addLockedKey(Object key)
Tracks the given key as locked by this invocation context. |
void |
clearLookedUpEntries()
Clears the collection of entries looked up |
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 all 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 |
putLookedUpEntries(Map<Object,CacheEntry> lookedUpEntries)
|
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)
|
Methods inherited from class org.infinispan.context.impl.AbstractTxInvocationContext |
---|
addAffectedKey, addAllAffectedKeys, clearLockedKeys, getAffectedKeys, hasModifications, isImplicitTransaction, isInTxScope, reset, setImplicitTransaction, setTransaction |
Methods inherited from class org.infinispan.context.impl.AbstractInvocationContext |
---|
clone, getClassLoader, getFlags, getOrigin, hasFlag, isContextFlagSet, isFlagsUninitialized, isUseFutureReturnType, setClassLoader, setContextFlag, setContextFlag, setFlags, setFlags, setOrigin, setUseFutureReturnType, toString, unsetContextFlag |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.infinispan.context.InvocationContext |
---|
clone, getClassLoader, getOrigin, isUseFutureReturnType, setClassLoader, setUseFutureReturnType |
Methods inherited from interface org.infinispan.context.FlagContainer |
---|
getFlags, hasFlag, setFlags, setFlags |
Field Detail |
---|
public static final Map<Object,CacheEntry> EMPTY_ENTRY_MAP
Constructor Detail |
---|
public LocalTxInvocationContext()
Method Detail |
---|
public boolean isTransactionValid()
public boolean isOriginLocal()
InvocationContext
public Object getLockOwner()
InvocationContext
public GlobalTransaction getGlobalTransaction()
TxInvocationContext
public List<WriteCommand> getModifications()
TxInvocationContext
public void setLocalTransaction(LocalTransaction localTransaction)
public CacheEntry lookupEntry(Object key)
EntryLookup
key
- key to look up
public Map<Object,CacheEntry> getLookedUpEntries()
EntryLookup
public void putLookedUpEntry(Object key, CacheEntry e)
EntryLookup
key
- key to storee
- entry to storepublic void putLookedUpEntries(Map<Object,CacheEntry> lookedUpEntries)
public void removeLookedUpEntry(Object key)
public void clearLookedUpEntries()
EntryLookup
public boolean hasLockedKey(Object key)
InvocationContext
hasLockedKey
in interface InvocationContext
hasLockedKey
in class AbstractInvocationContext
key
- lock to testpublic void remoteLocksAcquired(Collection<Address> nodes)
public Collection<Address> getRemoteLocksAcquired()
public AbstractCacheTransaction getCacheTransaction()
getCacheTransaction
in interface TxInvocationContext
getCacheTransaction
in class AbstractTxInvocationContext
public Set<Object> getLockedKeys()
InvocationContext
public void addLockedKey(Object key)
InvocationContext
public Transaction getTransaction()
TxInvocationContext
InvocationContext.isOriginLocal()
, as Transaction
are not propagated from the node where tx was
started.
getTransaction
in interface TxInvocationContext
getTransaction
in class AbstractTxInvocationContext
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |