Package de.hybris.platform.cache2
Class SimpleObjectCache<T>
- java.lang.Object
-
- de.hybris.platform.cache2.SimpleObjectCache<T>
-
- All Implemented Interfaces:
ObjectCache<T>
public class SimpleObjectCache<T> extends java.lang.Object implements ObjectCache<T>
-
-
Constructor Summary
Constructors Constructor Description SimpleObjectCache()
-
Method Summary
All Methods Instance Methods Concrete 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
public T getObject(ObjectKey<T> objectKey)
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
public void addObject(ObjectKey<T> objectKey, T object)
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
public T removeObject(ObjectKey<T> objectKey)
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>
-
-