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
Common features of transaction and invocation contexts
- Since:
- 4.0
- Author:
- Manik Surtani, Mircea.Markus@jboss.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones the invocation context.final Address
boolean
hasLockedKey
(Object key) Returns true if the lock being tested is already held in the current scope, false otherwise.boolean
boolean
Returns true if the call was originated locally, false if it is the result of a remote rpc.<K,
V> org.reactivestreams.Publisher <CacheEntry<K, V>> Returns a Publisher that when subscribed to provide all values that have a value in the given context.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 Details
-
AbstractInvocationContext
-
-
Method Details
-
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
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
-
isEntryRemovedInContext
- Specified by:
isEntryRemovedInContext
in interfaceInvocationContext
-
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
-
publisher
Description copied from interface:EntryLookup
Returns a Publisher that when subscribed to provide all values that have a value in the given context.- Specified by:
publisher
in interfaceEntryLookup
- Type Parameters:
K
- key type provided from userV
- value type provided from user- Returns:
-