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, setModeprotected WorkflowCloneLibrary nullCloneLibrary
protected final Map<String,WorkflowCloneLibrary> map
public void addCacheItem(WorkflowCloneLibrary item)
CloneLibCacheWrapperWorkflowCloneLibrary instance to the cache.item - an instance to add to the cachepublic boolean removeCacheItems(Set<WorkflowCloneLibrary> items)
CloneLibCacheWrapperWorkflowCloneLibrary 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)
CloneLibCacheWrapperkey - the cache keyCloneLibCacheWrapper.releaseCacheItems()public WorkflowCloneLibrary getByOriginalKey(String key)
CloneLibCacheWrapperkey - the cache item keypublic WorkflowCloneLibrary getByCloneKey(String key)
CloneLibCacheWrapperkey - the cache item keyCopyright © 2021. All rights reserved.