Package org.infinispan.context.impl
Class ClearInvocationContext
java.lang.Object
org.infinispan.context.impl.AbstractInvocationContext
org.infinispan.context.impl.ClearInvocationContext
- All Implemented Interfaces:
Cloneable
,EntryLookup
,InvocationContext
Implementation of
InvocationContext
used by the ClearCommand
.- Since:
- 7.2
- Author:
- Pedro Ruivo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLockedKey
(Object key) Tracks the given key as locked by this invocation context.void
clone()
Clones the invocation context.Returns the set of keys that are locked for writing.Returns the in behalf of which locks will be acquired.Retrieves a map of entries looked up within the current scope.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 this call is performed in the context of an transaction, false otherwise.lookupEntry
(Object key) Retrieves an entry from the collection of looked up entries in the current scope.void
putLookedUpEntry
(Object key, CacheEntry e) Puts an entry in the registry of looked up entries in the current scope.void
void
setLockOwner
(Object lockOwner) Sets the object to be used by lock owner.Methods inherited from class org.infinispan.context.impl.AbstractInvocationContext
getOrigin, isOriginLocal, publisher
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, lookedUpEntriesCount, removeLookedUpEntries
Methods inherited from interface org.infinispan.context.InvocationContext
addLockedKeys
-
Constructor Details
-
ClearInvocationContext
-
-
Method Details
-
isInTxScope
public boolean isInTxScope()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
Description copied from interface:InvocationContext
Returns the in behalf of which locks will be acquired.- Specified by:
getLockOwner
in interfaceInvocationContext
-
setLockOwner
Description copied from interface:InvocationContext
Sets the object to be used by lock owner.- Specified by:
setLockOwner
in interfaceInvocationContext
-
clone
Description copied from interface:InvocationContext
Clones the invocation context.- Specified by:
clone
in interfaceInvocationContext
- Overrides:
clone
in classAbstractInvocationContext
- Returns:
- A cloned instance of this invocation context instance
-
getLockedKeys
Description copied from interface:InvocationContext
Returns the set of keys that are locked for writing.- Specified by:
getLockedKeys
in interfaceInvocationContext
-
clearLockedKeys
public void clearLockedKeys()- Specified by:
clearLockedKeys
in interfaceInvocationContext
-
addLockedKey
Description copied from interface:InvocationContext
Tracks the given key as locked by this invocation context.- Specified by:
addLockedKey
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
- Overrides:
hasLockedKey
in classAbstractInvocationContext
- Parameters:
key
- lock to test
-
isEntryRemovedInContext
- Specified by:
isEntryRemovedInContext
in interfaceInvocationContext
- Overrides:
isEntryRemovedInContext
in classAbstractInvocationContext
-
lookupEntry
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.
-
getLookedUpEntries
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.
-
putLookedUpEntry
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
- Specified by:
removeLookedUpEntry
in interfaceEntryLookup
-