Package org.infinispan.context.impl
Class AbstractInvocationContext
- java.lang.Object
-
- org.infinispan.context.impl.AbstractInvocationContext
-
- All Implemented Interfaces:
Cloneable
,EntryLookup
,InvocationContext
- Direct Known Subclasses:
AbstractTxInvocationContext
,ClearInvocationContext
,NonTxInvocationContext
public abstract class AbstractInvocationContext extends Object implements InvocationContext
Common features of transaction and invocation contexts- Since:
- 4.0
- Author:
- Manik Surtani, Mircea.Markus@jboss.com
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractInvocationContext(Address origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description InvocationContext
clone()
Clones the invocation context.ClassLoader
getClassLoader()
Returns the class loader associated with this invocationAddress
getOrigin()
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
isOriginLocal()
Returns true if the call was originated locally, false if it is the result of a remote rpc.protected void
onEntryValueReplaced(Object key, InternalCacheEntry cacheEntry)
Deprecated.Since 8.1, no longer used.void
setClassLoader(ClassLoader classLoader)
Sets the class loader associated for this invocation-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.context.EntryLookup
forEachEntry, forEachValue, getLookedUpEntries, lookedUpEntriesCount, lookupEntry, putLookedUpEntry, removeLookedUpEntries, removeLookedUpEntry
-
Methods inherited from interface org.infinispan.context.InvocationContext
addLockedKey, clearLockedKeys, getLockedKeys, getLockOwner, isInTxScope, replaceValue, setLockOwner
-
-
-
-
Constructor Detail
-
AbstractInvocationContext
protected AbstractInvocationContext(Address origin)
-
-
Method Detail
-
getOrigin
public final Address getOrigin()
- Specified by:
getOrigin
in interfaceInvocationContext
- Returns:
- the origin of the command, or null if the command originated locally
-
isOriginLocal
public boolean isOriginLocal()
Description copied from interface:InvocationContext
Returns true if the call was originated locally, false if it is the result of a remote rpc.- Specified by:
isOriginLocal
in interfaceInvocationContext
-
hasLockedKey
public boolean hasLockedKey(Object key)
Description copied from interface:InvocationContext
Returns true if the lock being tested is already held in the current scope, false otherwise.- Specified by:
hasLockedKey
in interfaceInvocationContext
- Parameters:
key
- lock to test
-
getClassLoader
public final ClassLoader getClassLoader()
Description copied from interface:InvocationContext
Returns the class loader associated with this invocation- Specified by:
getClassLoader
in interfaceInvocationContext
- Returns:
- a class loader instance or null if no class loader was specifically associated
-
setClassLoader
public final void setClassLoader(ClassLoader classLoader)
Description copied from interface:InvocationContext
Sets the class loader associated for this invocation- Specified by:
setClassLoader
in interfaceInvocationContext
-
isEntryRemovedInContext
public boolean isEntryRemovedInContext(Object key)
- Specified by:
isEntryRemovedInContext
in interfaceInvocationContext
-
onEntryValueReplaced
@Deprecated protected void onEntryValueReplaced(Object key, InternalCacheEntry cacheEntry)
Deprecated.Since 8.1, no longer used.
-
clone
public InvocationContext clone()
Description copied from interface:InvocationContext
Clones the invocation context.- Specified by:
clone
in interfaceInvocationContext
- Overrides:
clone
in classObject
- Returns:
- A cloned instance of this invocation context instance
-
-