Package de.hybris.platform.cache2
Class SimpleObjectCache<T>
java.lang.Object
de.hybris.platform.cache2.SimpleObjectCache<T>
- All Implemented Interfaces:
ObjectCache<T>
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
SimpleObjectCache
public SimpleObjectCache()
-
-
Method Details
-
getObject
Description copied from interface:ObjectCacheGet the object which is found under the given key. Returns null when no object is found.- Specified by:
getObjectin interfaceObjectCache<T>- Returns:
- Object or null if there was no object with the given key in the cache.
-
addObject
Description copied from interface:ObjectCacheAdds an object under the given key to the cache.- Specified by:
addObjectin interfaceObjectCache<T>- Parameters:
objectKey- the ObjectKeyobject- the object to be added
-
removeObject
Description copied from interface:ObjectCacheRemoves an object from the cache.- Specified by:
removeObjectin interfaceObjectCache<T>- Parameters:
objectKey- ObjectKey- Returns:
- the bean if it was mapped before or null
-
clear
public void clear()Description copied from interface:ObjectCacheClear the cache.- Specified by:
clearin interfaceObjectCache<T>
-