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 everyObjectCacheonly with aObjectCacheManager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddObject(ObjectKey<T> objectKey, T object)Adds an object under the given key to the cache.voidclear()Clear the cache.TgetObject(ObjectKey<T> objectKey)Get the object which is found under the given key.TremoveObject(ObjectKey<T> objectKey)Removes an object from the cache.
-
-
-
Method Detail
-
getObject
T getObject(ObjectKey<T> objectKey)
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
void addObject(ObjectKey<T> objectKey, T object)
Adds an object under the given key to the cache.- Parameters:
objectKey- the ObjectKeyobject- the object to be added
-
removeObject
T removeObject(ObjectKey<T> objectKey)
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.
-
-