Package de.hybris.platform.cache2
Interface ObjectCacheManager<T>
- All Known Implementing Classes:
AbstractObjectCacheManager,Cache2Test.TestObjectCacheManager,ObjectCacheManagerImpl
public interface ObjectCacheManager<T>
The CacheManager manages access, creation, updating and destruction of cached objects. This means coordination of
low-level cache elements, encapsulation and outside representation as one cache.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionLooks for the object under the givenObjectKey.getCache()Returns the underlaying cache.voidinvalidate(ObjectKey<T> objectKey) Invalidates the object under the given (@link ObjectKey}voidsetCache(ObjectCache<T> objectCache) Set the underlaying cache implementation
-
Method Details
-
fetch
Looks for the object under the givenObjectKey. There are three possibilities:
When the object is found, it will be returned.
When no object is found, theObjectCreatorcreates a new one. The newly created object will be put on the cache and returned.
When the signature of the objectKey is outdated, the appropriate cached object (when available) will be removed. The keys signature will be renewed, theObjectCreatorcreates a new object which is put on the cache and returned.- Parameters:
objectKey- ObjectKey- Returns:
- cached object.
-
invalidate
Invalidates the object under the given (@link ObjectKey}- Parameters:
objectKey- the object key
-
getCache
ObjectCache<T> getCache()Returns the underlaying cache. The cache does not have any automated management and provides only low-level access.- Returns:
- ObjectCache the cache implementation
-
setCache
Set the underlaying cache implementation- Parameters:
objectCache- the cache implementation
-