|
||||||||||
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 AbstractContext
public boolean hasLockedKey(Object key)
EntryLookup
TransactionContext
.
Using this method should always ensure locks checked in the appropriate scope.
hasLockedKey
in interface EntryLookup
hasLockedKey
in class AbstractContext
key
- lock to test
public CacheEntry lookupEntry(Object k)
EntryLookup
TransactionContext
.
lookupEntry
in interface EntryLookup
lookupEntry
in class AbstractContext
k
- key to look up
public void removeLookedUpEntry(Object key)
removeLookedUpEntry
in interface EntryLookup
removeLookedUpEntry
in class AbstractContext
public void putLookedUpEntry(Object key, CacheEntry e)
EntryLookup
TransactionContext
.
putLookedUpEntry
in interface EntryLookup
putLookedUpEntry
in class AbstractContext
key
- key to storee
- entry to storepublic void putLookedUpEntries(Map<Object,CacheEntry> lookedUpEntries)
putLookedUpEntries
in interface EntryLookup
putLookedUpEntries
in class AbstractContext
public void clearLookedUpEntries()
EntryLookup
clearLookedUpEntries
in interface EntryLookup
clearLookedUpEntries
in class AbstractContext
public BidirectionalMap<Object,CacheEntry> getLookedUpEntries()
EntryLookup
TransactionContext
.
getLookedUpEntries
in interface EntryLookup
getLookedUpEntries
in class AbstractContext
public InvocationContext copy()
copy
in interface InvocationContext
public void setLocalRollbackOnly(boolean localRollbackOnly)
setLocalRollbackOnly
in interface InvocationContext
localRollbackOnly
- if true, the context is only rolling back.public Transaction getTransaction()
getTransaction
in interface InvocationContext
public void setTransaction(Transaction transaction)
setTransaction
in interface InvocationContext
transaction
- transaction to setpublic TransactionContext getTransactionContext()
getTransactionContext
in interface InvocationContext
public void setTransactionContext(TransactionContext transactionContext)
setTransactionContext
in interface InvocationContext
transactionContext
- transaction context to setpublic GlobalTransaction getGlobalTransaction()
getGlobalTransaction
in interface InvocationContext
public void setGlobalTransaction(GlobalTransaction globalTransaction)
setGlobalTransaction
in interface InvocationContext
globalTransaction
- global transaction to setpublic boolean isOriginLocal()
isOriginLocal
in interface InvocationContext
public void setOriginLocal(boolean originLocal)
setOriginLocal
in interface InvocationContext
originLocal
- flag to setpublic boolean isLocalRollbackOnly()
isLocalRollbackOnly
in interface InvocationContext
public void reset()
reset
in interface InvocationContext
reset
in class AbstractContext
public void setState(InvocationContext template)
setState
in interface InvocationContext
template
- template to copy frompublic boolean isValidTransaction()
isValidTransaction
in interface InvocationContext
public boolean isContainsModifications()
isContainsModifications
in interface EntryLookup
isContainsModifications
in class AbstractContext
public void setContainsModifications(boolean b)
EntryLookup
setContainsModifications
in interface EntryLookup
setContainsModifications
in class AbstractContext
public boolean isContainsLocks()
isContainsLocks
in interface EntryLookup
isContainsLocks
in class AbstractContext
public void setContainsLocks(boolean b)
EntryLookup
setContainsLocks
in interface EntryLookup
setContainsLocks
in class AbstractContext
public boolean equals(Object o)
equals
in class AbstractContext
public int hashCode()
hashCode
in class AbstractContext
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |