Package org.infinispan.context
Class SingleKeyNonTxInvocationContext
- java.lang.Object
-
- org.infinispan.context.SingleKeyNonTxInvocationContext
-
- All Implemented Interfaces:
Cloneable
,EntryLookup
,InvocationContext
@Deprecated public final class SingleKeyNonTxInvocationContext extends Object implements InvocationContext
Deprecated.Since 9.0, this class is going to be moved to an internal package.- Author:
- Mircea Markus, Sanne Grinovero
-
-
Constructor Summary
Constructors Constructor Description SingleKeyNonTxInvocationContext(Address origin)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addLockedKey(Object key)
Deprecated.Tracks the given key as locked by this invocation context.void
clearLockedKeys()
Deprecated.InvocationContext
clone()
Deprecated.Clones the invocation context.void
forEachEntry(BiConsumer<Object,CacheEntry> action)
Deprecated.Execute an action for each entry in the context.CacheEntry
getCacheEntry()
Deprecated.ClassLoader
getClassLoader()
Deprecated.Returns the class loader associated with this invocationObject
getKey()
Deprecated.Set<Object>
getLockedKeys()
Deprecated.Returns the set of keys that are locked for writing.Object
getLockOwner()
Deprecated.Returns the in behalf of which locks will be acquired.Map<Object,CacheEntry>
getLookedUpEntries()
Deprecated.Retrieves a map of entries looked up within the current scope.Address
getOrigin()
Deprecated.boolean
hasLockedKey(Object key)
Deprecated.Returns true if the lock being tested is already held in the current scope, false otherwise.boolean
isEntryRemovedInContext(Object key)
Deprecated.boolean
isInTxScope()
Deprecated.Returns true if this call is performed in the context of an transaction, false otherwise.boolean
isKeyEquals(Object key)
Deprecated.boolean
isOriginLocal()
Deprecated.Returns true if the call was originated locally, false if it is the result of a remote rpc.int
lookedUpEntriesCount()
Deprecated.CacheEntry
lookupEntry(Object key)
Deprecated.Retrieves an entry from the collection of looked up entries in the current scope.void
putLookedUpEntry(Object key, CacheEntry e)
Deprecated.Puts an entry in the registry of looked up entries in the current scope.void
removeLookedUpEntry(Object key)
Deprecated.void
resetState()
Deprecated.void
setClassLoader(ClassLoader classLoader)
Deprecated.Sets the class loader associated for this invocationvoid
setLockOwner(Object lockOwner)
Deprecated.Sets the object to be used by lock owner.String
toString()
Deprecated.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.context.EntryLookup
forEachValue, removeLookedUpEntries
-
Methods inherited from interface org.infinispan.context.InvocationContext
replaceValue
-
-
-
-
Constructor Detail
-
SingleKeyNonTxInvocationContext
public SingleKeyNonTxInvocationContext(Address origin)
Deprecated.
-
-
Method Detail
-
isOriginLocal
public boolean isOriginLocal()
Deprecated.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
-
isInTxScope
public boolean isInTxScope()
Deprecated.Description copied from interface:InvocationContext
Returns true if this call is performed in the context of an transaction, false otherwise.- Specified by:
isInTxScope
in interfaceInvocationContext
-
getLockOwner
public Object getLockOwner()
Deprecated.Description copied from interface:InvocationContext
Returns the in behalf of which locks will be acquired.- Specified by:
getLockOwner
in interfaceInvocationContext
-
setLockOwner
public void setLockOwner(Object lockOwner)
Deprecated.Description copied from interface:InvocationContext
Sets the object to be used by lock owner.- Specified by:
setLockOwner
in interfaceInvocationContext
-
clone
public InvocationContext clone()
Deprecated.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
-
getLockedKeys
public Set<Object> getLockedKeys()
Deprecated.Description copied from interface:InvocationContext
Returns the set of keys that are locked for writing.- Specified by:
getLockedKeys
in interfaceInvocationContext
-
clearLockedKeys
public void clearLockedKeys()
Deprecated.- Specified by:
clearLockedKeys
in interfaceInvocationContext
-
addLockedKey
public void addLockedKey(Object key)
Deprecated.Description copied from interface:InvocationContext
Tracks the given key as locked by this invocation context.- Specified by:
addLockedKey
in interfaceInvocationContext
-
lookupEntry
public CacheEntry lookupEntry(Object key)
Deprecated.Description copied from interface:EntryLookup
Retrieves an entry from the collection of looked up entries in the current scope.- Specified by:
lookupEntry
in interfaceEntryLookup
- Parameters:
key
- key to look up- Returns:
- an entry, or null if it cannot be found.
-
isKeyEquals
public boolean isKeyEquals(Object key)
Deprecated.
-
getLookedUpEntries
public Map<Object,CacheEntry> getLookedUpEntries()
Deprecated.Description copied from interface:EntryLookup
Retrieves a map of entries looked up within the current scope. Note: The key inside the CacheEntry may benull
if the key does not exist in the cache.- Specified by:
getLookedUpEntries
in interfaceEntryLookup
- Returns:
- a map of looked up entries.
-
forEachEntry
public void forEachEntry(BiConsumer<Object,CacheEntry> action)
Deprecated.Description copied from interface:EntryLookup
Execute an action for each entry in the context. Includes invalid entries, which have anull
value and may also report anull
key.- Specified by:
forEachEntry
in interfaceEntryLookup
-
lookedUpEntriesCount
public int lookedUpEntriesCount()
Deprecated.- Specified by:
lookedUpEntriesCount
in interfaceEntryLookup
- Returns:
- The number of entries wrapped in the context, including invalid entries.
-
putLookedUpEntry
public void putLookedUpEntry(Object key, CacheEntry e)
Deprecated.Description copied from interface:EntryLookup
Puts an entry in the registry of looked up entries in the current scope.- Specified by:
putLookedUpEntry
in interfaceEntryLookup
- Parameters:
key
- key to storee
- entry to store
-
removeLookedUpEntry
public void removeLookedUpEntry(Object key)
Deprecated.- Specified by:
removeLookedUpEntry
in interfaceEntryLookup
-
getKey
public Object getKey()
Deprecated.
-
getCacheEntry
public CacheEntry getCacheEntry()
Deprecated.
-
getOrigin
public Address getOrigin()
Deprecated.- Specified by:
getOrigin
in interfaceInvocationContext
- Returns:
- the origin of the command, or null if the command originated locally
-
getClassLoader
public ClassLoader getClassLoader()
Deprecated.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 void setClassLoader(ClassLoader classLoader)
Deprecated.Description copied from interface:InvocationContext
Sets the class loader associated for this invocation- Specified by:
setClassLoader
in interfaceInvocationContext
-
hasLockedKey
public boolean hasLockedKey(Object key)
Deprecated.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
public boolean isEntryRemovedInContext(Object key)
Deprecated.- Specified by:
isEntryRemovedInContext
in interfaceInvocationContext
-
resetState
public void resetState()
Deprecated.
-
-