public class CloneLibCacheLocalMapWrapper extends CloneLibCacheWrapperAdapter
CloneLibCacheWrapper
implementation
that uses a simple HashMap as the backing cache. This implementation is not suitable for access by more than one thread.
This cache is generally used when the CloneCache.isLongLifecycleCache
value is false.Modifier and Type | Field and Description |
---|---|
protected Map<String,WorkflowCloneLibrary> |
map |
protected WorkflowCloneLibrary |
nullCloneLibrary |
MODE_COMPLETE, MODE_PARTIAL, MODE_UNSET
Constructor and Description |
---|
CloneLibCacheLocalMapWrapper() |
Modifier and Type | Method and Description |
---|---|
void |
addCacheItem(WorkflowCloneLibrary item)
Add a
WorkflowCloneLibrary instance to the cache. |
WorkflowCloneLibrary |
getByCloneKey(String key)
Retrieve an item from the backing cache using a fetch key based on the clone id.
|
WorkflowCloneLibrary |
getByOriginalKey(String key)
Retrieve an item from the backing cache using a fetch key based on the original id.
|
boolean |
removeCacheItems(Set<WorkflowCloneLibrary> items)
Remove a
WorkflowCloneLibrary instance list from the cache. |
WorkflowCloneLibrary |
reserveCacheItem(String key)
Reserve a cache item using the key for the item.
|
auditKey, auditSize, clear, dequeueForAdd, destroy, getAddQueue, getByOriginalKeyFromInternalCacheOnly, getMode, getRefreshCache, getUniqueElementCount, isRemovalQueueEmpty, queueForAdd, releaseCacheItems, reliableRemoveCacheItemGroup, setMode
protected WorkflowCloneLibrary nullCloneLibrary
protected final Map<String,WorkflowCloneLibrary> map
public void addCacheItem(WorkflowCloneLibrary item)
CloneLibCacheWrapper
WorkflowCloneLibrary
instance to the cache.item
- an instance to add to the cachepublic boolean removeCacheItems(Set<WorkflowCloneLibrary> items)
CloneLibCacheWrapper
WorkflowCloneLibrary
instance list from the cache. May
not succeed if an item in the list is currently reserved by another thread.items
- a representative instance list used to search the cache for matching cache members to removepublic WorkflowCloneLibrary reserveCacheItem(String key)
CloneLibCacheWrapper
key
- the cache keyCloneLibCacheWrapper.releaseCacheItems()
public WorkflowCloneLibrary getByOriginalKey(String key)
CloneLibCacheWrapper
key
- the cache item keypublic WorkflowCloneLibrary getByCloneKey(String key)
CloneLibCacheWrapper
key
- the cache item keyCopyright © 2021. All rights reserved.