public final class SingleKeyNonTxInvocationContext extends Object implements InvocationContext
| Constructor and Description |
|---|
SingleKeyNonTxInvocationContext(Address origin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLockedKey(Object key)
Tracks the given key as locked by this invocation context.
|
void |
clearLockedKeys() |
InvocationContext |
clone()
Clones the invocation context.
|
void |
forEachEntry(BiConsumer<Object,CacheEntry> action)
Execute an action for each entry in the context.
|
CacheEntry |
getCacheEntry() |
Object |
getKey() |
Set<Object> |
getLockedKeys()
Returns the set of keys that are locked for writing.
|
Object |
getLockOwner()
Returns the in behalf of which locks will be acquired.
|
Map<Object,CacheEntry> |
getLookedUpEntries()
Retrieves a map of entries looked up within the current scope.
|
Address |
getOrigin() |
boolean |
hasLockedKey(Object key)
Returns true if the lock being tested is already held in the current scope, false otherwise.
|
boolean |
isEntryRemovedInContext(Object key) |
boolean |
isInTxScope()
Returns true if this call is performed in the context of an transaction, false otherwise.
|
boolean |
isKeyEquals(Object key) |
boolean |
isOriginLocal()
Returns true if the call was originated locally, false if it is the result of a remote rpc.
|
int |
lookedUpEntriesCount() |
CacheEntry |
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 |
removeLookedUpEntry(Object key) |
void |
resetState() |
void |
setLockOwner(Object lockOwner)
Sets the object to be used by lock owner.
|
String |
toString() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLockedKeysforEachValue, removeLookedUpEntriespublic SingleKeyNonTxInvocationContext(Address origin)
public boolean isOriginLocal()
InvocationContextisOriginLocal in interface InvocationContextpublic boolean isInTxScope()
InvocationContextisInTxScope in interface InvocationContextpublic Object getLockOwner()
InvocationContextgetLockOwner in interface InvocationContextpublic void setLockOwner(Object lockOwner)
InvocationContextsetLockOwner in interface InvocationContextpublic InvocationContext clone()
InvocationContextclone in interface InvocationContextclone in class Objectpublic Set<Object> getLockedKeys()
InvocationContextgetLockedKeys in interface InvocationContextpublic void clearLockedKeys()
clearLockedKeys in interface InvocationContextpublic void addLockedKey(Object key)
InvocationContextaddLockedKey in interface InvocationContextpublic CacheEntry lookupEntry(Object key)
EntryLookuplookupEntry in interface EntryLookupkey - key to look uppublic boolean isKeyEquals(Object key)
public Map<Object,CacheEntry> getLookedUpEntries()
EntryLookupnull if the key does not exist in the cache.getLookedUpEntries in interface EntryLookuppublic void forEachEntry(BiConsumer<Object,CacheEntry> action)
EntryLookupnull value and may also report a null key.forEachEntry in interface EntryLookuppublic int lookedUpEntriesCount()
lookedUpEntriesCount in interface EntryLookuppublic void putLookedUpEntry(Object key, CacheEntry e)
EntryLookupputLookedUpEntry in interface EntryLookupkey - key to storee - entry to storepublic void removeLookedUpEntry(Object key)
removeLookedUpEntry in interface EntryLookuppublic Object getKey()
public CacheEntry getCacheEntry()
public Address getOrigin()
getOrigin in interface InvocationContextpublic boolean hasLockedKey(Object key)
InvocationContexthasLockedKey in interface InvocationContextkey - lock to testpublic boolean isEntryRemovedInContext(Object key)
isEntryRemovedInContext in interface InvocationContextpublic void resetState()
Copyright © 2021 JBoss by Red Hat. All rights reserved.