Interface ICacheAccess<K,V> 
- All Superinterfaces:
- ICacheAccessManagement
- All Known Implementing Classes:
- CacheAccess
- 
Method SummaryModifier and TypeMethodDescriptionBasic get method.Basic get method.getCacheElement(K name) This method returns the ICacheElement<K, V> wrapper which provides access to element info and other attributes.Map<K,ICacheElement<K, V>> getCacheElements(Set<K> names) Get multiple elements from the cache based on a set of cache keys.getElementAttributes(K name) Gets the elementAttributes attribute of the ICacheAccess objectgetMatching(String pattern) Retrieve matching objects from the cache region this instance provides access to.Map<K,ICacheElement<K, V>> getMatchingCacheElements(String pattern) Get multiple elements from the cache based on a set of cache keys.voidPuts and/or overrides an element with the name in that region.voidput(K name, V obj, IElementAttributes attr) Description of the MethodvoidPuts in cache if an item does not exist with the name in that region.voidRemove an object for this key if one exists, else do nothing.voidresetElementAttributes(K name, IElementAttributes attributes) Reset the attributes on the object matching this key name.Methods inherited from interface org.apache.commons.jcs3.access.behavior.ICacheAccessManagementclear, dispose, freeMemoryElements, getCacheAttributes, getDefaultElementAttributes, getStatistics, getStats, setCacheAttributes, setDefaultElementAttributes
- 
Method Details- 
getBasic get method.- Parameters:
- name-
- Returns:
- Object or null if not found.
 
- 
getBasic get method. If the object cannot be found in the cache, it will be retrieved by calling the supplier and subsequently storing it in the cache.- Parameters:
- name-
- supplier- supplier to be called if the value is not found
- Returns:
- Object.
 
- 
getMatchingRetrieve matching objects from the cache region this instance provides access to.- Parameters:
- pattern- - a key pattern for the objects stored
- Returns:
- A map of key to values. These are stripped from the wrapper.
 
- 
putSafePuts in cache if an item does not exist with the name in that region.- Parameters:
- name-
- obj-
- Throws:
- CacheException
 
- 
putPuts and/or overrides an element with the name in that region.- Parameters:
- name-
- obj-
- Throws:
- CacheException
 
- 
putDescription of the Method- Parameters:
- name-
- obj-
- attr-
- Throws:
- CacheException
 
- 
getCacheElementThis method returns the ICacheElement<K, V> wrapper which provides access to element info and other attributes.This returns a reference to the wrapper. Any modifications will be reflected in the cache. No defensive copy is made. This method is most useful if you want to determine things such as the how long the element has been in the cache. The last access time in the ElementAttributes should be current. - Parameters:
- name- Key the object is stored as
- Returns:
- The ICacheElement<K, V> if the object is found or null
 
- 
getCacheElementsGet multiple elements from the cache based on a set of cache keys.This method returns the ICacheElement<K, V> wrapper which provides access to element info and other attributes. This returns a reference to the wrapper. Any modifications will be reflected in the cache. No defensive copy is made. This method is most useful if you want to determine things such as the how long the element has been in the cache. The last access time in the ElementAttributes should be current. - Parameters:
- names- set of Object cache keys
- Returns:
- a map of Object key to ICacheElement<K, V> element, or empty map if none of the keys are present
 
- 
getMatchingCacheElementsGet multiple elements from the cache based on a set of cache keys.This method returns the ICacheElement<K, V> wrapper which provides access to element info and other attributes. This returns a reference to the wrapper. Any modifications will be reflected in the cache. No defensive copy is made. This method is most useful if you want to determine things such as the how long the element has been in the cache. The last access time in the ElementAttributes should be current. - Parameters:
- pattern- key search pattern
- Returns:
- a map of Object key to ICacheElement<K, V> element, or empty map if no keys match the pattern
 
- 
removeRemove an object for this key if one exists, else do nothing.- Parameters:
- name-
- Throws:
- CacheException
 
- 
resetElementAttributesReset the attributes on the object matching this key name.- Parameters:
- name-
- attributes-
- Throws:
- CacheException
 
- 
getElementAttributesGets the elementAttributes attribute of the ICacheAccess object- Parameters:
- name-
- Returns:
- The elementAttributes value
- Throws:
- CacheException
 
 
-