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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the invocation context.final AddressbooleanhasLockedKey(Object key) Returns true if the lock being tested is already held in the current scope, false otherwise.booleanbooleanReturns 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, waitMethods inherited from interface org.infinispan.context.EntryLookup
forEachEntry, forEachValue, getLookedUpEntries, lookedUpEntriesCount, lookupEntry, putLookedUpEntry, removeLookedUpEntries, removeLookedUpEntryMethods inherited from interface org.infinispan.context.InvocationContext
addLockedKey, addLockedKeys, clearLockedKeys, getLockedKeys, getLockOwner, isInTxScope, setLockOwner
-
Constructor Details
-
AbstractInvocationContext
-
-
Method Details
-
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
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
- Specified by:
isEntryRemovedInContextin interfaceInvocationContext
-
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
-
publisher
Description copied from interface:EntryLookupReturns a Publisher that when subscribed to provide all values that have a value in the given context.- Specified by:
publisherin interfaceEntryLookup- Type Parameters:
K- key type provided from userV- value type provided from user- Returns:
-