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 protectedAbstractInvocationContext(Address origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvocationContextclone()Clones the invocation context.AddressgetOrigin()booleanhasLockedKey(Object key)Returns true if the lock being tested is already held in the current scope, false otherwise.booleanisEntryRemovedInContext(Object key)booleanisOriginLocal()Returns true if the call was originated locally, false if it is the result of a remote rpc.-
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, addLockedKeys, clearLockedKeys, getLockedKeys, getLockOwner, isInTxScope, setLockOwner
-
-
-
-
Constructor Detail
-
AbstractInvocationContext
protected AbstractInvocationContext(Address origin)
-
-
Method Detail
-
getOrigin
public final Address getOrigin()
- Specified by:
getOriginin interfaceInvocationContext- Returns:
- the origin of the command, or null if the command originated locally
-
isOriginLocal
public boolean isOriginLocal()
Description copied from interface:InvocationContextReturns true if the call was originated locally, false if it is the result of a remote rpc.- Specified by:
isOriginLocalin interfaceInvocationContext
-
hasLockedKey
public boolean hasLockedKey(Object key)
Description copied from interface:InvocationContextReturns true if the lock being tested is already held in the current scope, false otherwise.- Specified by:
hasLockedKeyin interfaceInvocationContext- Parameters:
key- lock to test
-
isEntryRemovedInContext
public boolean isEntryRemovedInContext(Object key)
- Specified by:
isEntryRemovedInContextin interfaceInvocationContext
-
clone
public InvocationContext clone()
Description copied from interface:InvocationContextClones the invocation context.- Specified by:
clonein interfaceInvocationContext- Overrides:
clonein classObject- Returns:
- A cloned instance of this invocation context instance
-
-