Package de.hybris.platform.cache2
Interface ObjectCache<T>
- All Known Implementing Classes:
FIFOObjectCache,SimpleObjectCache
public interface ObjectCache<T>
Defines basic operations which are available for every cache. The ObjectCache is very low level and shouldn't be
accessed in an direct way. You should access every
ObjectCache only with a ObjectCacheManager.-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an object under the given key to the cache.voidclear()Clear the cache.Get the object which is found under the given key.removeObject(ObjectKey<T> objectKey) Removes an object from the cache.
-
Method Details
-
getObject
Get the object which is found under the given key. Returns null when no object is found.- Parameters:
objectKey-- Returns:
- Object or null if there was no object with the given key in the cache.
-
addObject
Adds an object under the given key to the cache.- Parameters:
objectKey- the ObjectKeyobject- the object to be added
-
removeObject
Removes an object from the cache.- Parameters:
objectKey- ObjectKey- Returns:
- the bean if it was mapped before or null
-
clear
void clear()Clear the cache.
-