|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.context.impl.ImmutableContext
public final class ImmutableContext
This context is a non-context for operations such as eviction which are not related to the method invocation which caused them.
| Field Summary | |
|---|---|
static ImmutableContext |
INSTANCE
|
| Method Summary | |
|---|---|
void |
addLockedKey(Object key)
Tracks the given key as locked by this invocation context. |
void |
clearLockedKeys()
|
void |
clearLookedUpEntries()
Clears the collection of entries looked up |
InvocationContext |
clone()
Clones the invocation context. |
ClassLoader |
getClassLoader()
Returns the class loader associated with this invocation |
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. |
Address |
getOrigin()
Get the origin of the command, or null if the command originated locally |
boolean |
hasLockedKey(Object key)
Returns true if the lock being tested is already held in the current scope, false otherwise. |
boolean |
isEntryRemovedInContext(Object key)
|
boolean |
isInTxScope()
Returns true if this call is performed in the context of an transaction, false otherwise. |
boolean |
isOriginLocal()
Returns true if the call was originated locally, false if it is the result of a remote rpc. |
boolean |
isUseFutureReturnType()
Indicates whether the call requires a Future
as return type. |
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 |
removeLookedUpEntry(Object key)
|
boolean |
replaceValue(Object key,
InternalCacheEntry cacheEntry)
Tries to replace the value of the wrapped entry associated with the given key in the context, if one exists. |
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader associated for this invocation |
void |
setUseFutureReturnType(boolean useFutureReturnType)
Sets whether the call requires a Future
as return type. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ImmutableContext INSTANCE
| Method Detail |
|---|
public CacheEntry lookupEntry(Object key)
EntryLookup
lookupEntry in interface EntryLookupkey - key to look up
public Map<Object,CacheEntry> getLookedUpEntries()
EntryLookup
getLookedUpEntries in interface EntryLookup
public void putLookedUpEntry(Object key,
CacheEntry e)
EntryLookup
putLookedUpEntry in interface EntryLookupkey - key to storee - entry to storepublic void putLookedUpEntries(Map<Object,CacheEntry> lookedUpEntries)
putLookedUpEntries in interface EntryLookuppublic void removeLookedUpEntry(Object key)
removeLookedUpEntry in interface EntryLookuppublic void clearLookedUpEntries()
EntryLookup
clearLookedUpEntries in interface EntryLookuppublic boolean hasLockedKey(Object key)
InvocationContext
hasLockedKey in interface InvocationContextkey - lock to testpublic boolean isOriginLocal()
InvocationContext
isOriginLocal in interface InvocationContextpublic Address getOrigin()
InvocationContext
getOrigin in interface InvocationContextpublic boolean isInTxScope()
InvocationContext
isInTxScope in interface InvocationContextpublic Object getLockOwner()
InvocationContext
getLockOwner in interface InvocationContextpublic boolean isUseFutureReturnType()
InvocationContextFuture
as return type.
isUseFutureReturnType in interface InvocationContextFuture
as return type, false otherwisepublic void setUseFutureReturnType(boolean useFutureReturnType)
InvocationContextFuture
as return type.
setUseFutureReturnType in interface InvocationContextuseFutureReturnType - boolean indicating whether a Future
will be needed.public Set<Object> getLockedKeys()
InvocationContext
getLockedKeys in interface InvocationContextpublic InvocationContext clone()
InvocationContext
clone in interface InvocationContextclone in class Objectpublic ClassLoader getClassLoader()
InvocationContext
getClassLoader in interface InvocationContextpublic void setClassLoader(ClassLoader classLoader)
InvocationContext
setClassLoader in interface InvocationContextpublic void addLockedKey(Object key)
InvocationContext
addLockedKey in interface InvocationContextpublic void clearLockedKeys()
clearLockedKeys in interface InvocationContext
public boolean replaceValue(Object key,
InternalCacheEntry cacheEntry)
InvocationContext
replaceValue in interface InvocationContextpublic boolean isEntryRemovedInContext(Object key)
isEntryRemovedInContext in interface InvocationContext
|
--> | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||