|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.context.AbstractContext
org.infinispan.context.InvocationContextImpl
public class InvocationContextImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.infinispan.context.AbstractContext |
|---|
AbstractContext.ContextFlags |
| Field Summary | |
|---|---|
protected TransactionContext |
transactionContext
|
| Fields inherited from class org.infinispan.context.AbstractContext |
|---|
contextFlags, flags, lookedUpEntries |
| Constructor Summary | |
|---|---|
InvocationContextImpl()
|
|
| Method Summary | |
|---|---|
void |
clearLookedUpEntries()
Clears the collection of entries looked up |
InvocationContext |
copy()
|
boolean |
equals(Object o)
|
GlobalTransaction |
getGlobalTransaction()
Retrieves the global transaction associated with this invocation |
protected int |
getLockSetSize()
|
BidirectionalMap<Object,CacheEntry> |
getLookedUpEntries()
Retrieves a map of entries looked up within the current scope. |
Transaction |
getTransaction()
Retrieves the transaction associated with this invocation |
TransactionContext |
getTransactionContext()
|
int |
hashCode()
|
boolean |
hasLockedKey(Object key)
Note that if a transaction is in scope, implementations should test this lock from on TransactionContext. |
boolean |
isContainsLocks()
|
boolean |
isContainsModifications()
|
boolean |
isLocalRollbackOnly()
|
boolean |
isOriginLocal()
Tests if this invocation originated locally or from a remote cache. |
boolean |
isValidTransaction()
|
CacheEntry |
lookupEntry(Object k)
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 |
removeLookedUpEntry(Object key)
|
void |
reset()
Resets the context, freeing up any references. |
void |
setContainsLocks(boolean b)
Sets whether locks have been acquired in the current context |
void |
setContainsModifications(boolean b)
Sets whether modifications have been made in the current context |
void |
setGlobalTransaction(GlobalTransaction globalTransaction)
Sets the global transaction associated with this invocation |
void |
setLocalRollbackOnly(boolean localRollbackOnly)
Marks teh context as only rolling back. |
void |
setOriginLocal(boolean originLocal)
If set to true, the invocation is assumed to have originated locally. |
void |
setState(InvocationContext template)
Sets the state of the InvocationContext based on the template context passed in |
void |
setTransaction(Transaction transaction)
Sets a transaction object on the invocation context. |
void |
setTransactionContext(TransactionContext transactionContext)
Sets the transaction context to be associated with the current thread. |
String |
toString()
|
| Methods inherited from class org.infinispan.context.AbstractContext |
|---|
copyInto, getFlags, hasFlag, isContextFlagSet, isFlagsUninitialized, resetFlags, setContextFlag, setContextFlag, setFlags, setFlags, unsetContextFlag |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.infinispan.context.FlagContainer |
|---|
getFlags, hasFlag, isFlagsUninitialized, resetFlags, setFlags, setFlags |
| Field Detail |
|---|
protected volatile TransactionContext transactionContext
| Constructor Detail |
|---|
public InvocationContextImpl()
| Method Detail |
|---|
protected final int getLockSetSize()
getLockSetSize in class AbstractContextpublic boolean hasLockedKey(Object key)
EntryLookupTransactionContext.
Using this method should always ensure locks checked in the appropriate scope.
hasLockedKey in interface EntryLookuphasLockedKey in class AbstractContextkey - lock to test
public CacheEntry lookupEntry(Object k)
EntryLookupTransactionContext.
lookupEntry in interface EntryLookuplookupEntry in class AbstractContextk - key to look up
public void removeLookedUpEntry(Object key)
removeLookedUpEntry in interface EntryLookupremoveLookedUpEntry in class AbstractContext
public void putLookedUpEntry(Object key,
CacheEntry e)
EntryLookupTransactionContext.
putLookedUpEntry in interface EntryLookupputLookedUpEntry in class AbstractContextkey - key to storee - entry to storepublic void putLookedUpEntries(Map<Object,CacheEntry> lookedUpEntries)
putLookedUpEntries in interface EntryLookupputLookedUpEntries in class AbstractContextpublic void clearLookedUpEntries()
EntryLookup
clearLookedUpEntries in interface EntryLookupclearLookedUpEntries in class AbstractContextpublic BidirectionalMap<Object,CacheEntry> getLookedUpEntries()
EntryLookupTransactionContext.
getLookedUpEntries in interface EntryLookupgetLookedUpEntries in class AbstractContextpublic InvocationContext copy()
copy in interface InvocationContextpublic void setLocalRollbackOnly(boolean localRollbackOnly)
setLocalRollbackOnly in interface InvocationContextlocalRollbackOnly - if true, the context is only rolling back.public Transaction getTransaction()
getTransaction in interface InvocationContextpublic void setTransaction(Transaction transaction)
setTransaction in interface InvocationContexttransaction - transaction to setpublic TransactionContext getTransactionContext()
getTransactionContext in interface InvocationContextpublic void setTransactionContext(TransactionContext transactionContext)
setTransactionContext in interface InvocationContexttransactionContext - transaction context to setpublic GlobalTransaction getGlobalTransaction()
getGlobalTransaction in interface InvocationContextpublic void setGlobalTransaction(GlobalTransaction globalTransaction)
setGlobalTransaction in interface InvocationContextglobalTransaction - global transaction to setpublic boolean isOriginLocal()
isOriginLocal in interface InvocationContextpublic void setOriginLocal(boolean originLocal)
setOriginLocal in interface InvocationContextoriginLocal - flag to setpublic boolean isLocalRollbackOnly()
isLocalRollbackOnly in interface InvocationContextpublic void reset()
reset in interface InvocationContextreset in class AbstractContextpublic void setState(InvocationContext template)
setState in interface InvocationContexttemplate - template to copy frompublic boolean isValidTransaction()
isValidTransaction in interface InvocationContextpublic boolean isContainsModifications()
isContainsModifications in interface EntryLookupisContainsModifications in class AbstractContextpublic void setContainsModifications(boolean b)
EntryLookup
setContainsModifications in interface EntryLookupsetContainsModifications in class AbstractContextpublic boolean isContainsLocks()
isContainsLocks in interface EntryLookupisContainsLocks in class AbstractContextpublic void setContainsLocks(boolean b)
EntryLookup
setContainsLocks in interface EntryLookupsetContainsLocks in class AbstractContextpublic boolean equals(Object o)
equals in class AbstractContextpublic int hashCode()
hashCode in class AbstractContextpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||