Package de.hybris.platform.test
Class Cache2Test.TestObjectCacheManager<T>
- java.lang.Object
-
- de.hybris.platform.cache2.AbstractObjectCacheManager<T>
-
- de.hybris.platform.test.Cache2Test.TestObjectCacheManager<T>
-
- All Implemented Interfaces:
ObjectCacheManager<T>
- Enclosing class:
- Cache2Test
public class Cache2Test.TestObjectCacheManager<T> extends AbstractObjectCacheManager<T>
-
-
Field Summary
Fields Modifier and Type Field Description intcreationCounterintexpirationCounterintinvalidationCounterintrequestCounter
-
Constructor Summary
Constructors Constructor Description TestObjectCacheManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ThandleCreation(ObjectKey<T> objectKey)Default implementation of how objects should be created.protected voidhandleExpiration(ObjectKey<T> objectKey)Default implementation simply removes the expired object.protected voidhandleInvalidation(ObjectKey<T> objectKey)Default implementation simply removed the invalidated object.protected ThandleRequest(ObjectKey<T> objectKey)Default implementation simply requests the cache with the given key.-
Methods inherited from class de.hybris.platform.cache2.AbstractObjectCacheManager
fetch, getCache, getDebugKey, invalidate, setCache, setExpirationCheck, setObjectAutoCreation
-
-
-
-
Method Detail
-
handleExpiration
protected void handleExpiration(ObjectKey<T> objectKey)
Description copied from class:AbstractObjectCacheManagerDefault implementation simply removes the expired object.- Overrides:
handleExpirationin classAbstractObjectCacheManager<T>
-
handleInvalidation
protected void handleInvalidation(ObjectKey<T> objectKey)
Description copied from class:AbstractObjectCacheManagerDefault implementation simply removed the invalidated object.- Overrides:
handleInvalidationin classAbstractObjectCacheManager<T>
-
handleRequest
protected T handleRequest(ObjectKey<T> objectKey)
Description copied from class:AbstractObjectCacheManagerDefault implementation simply requests the cache with the given key.- Overrides:
handleRequestin classAbstractObjectCacheManager<T>
-
handleCreation
protected T handleCreation(ObjectKey<T> objectKey)
Description copied from class:AbstractObjectCacheManagerDefault implementation of how objects should be created. This implementation calls the ObjectCreator (objectkey.getObjectCreator()) to create the object and puts this object into the cache.- Overrides:
handleCreationin classAbstractObjectCacheManager<T>- Parameters:
objectKey- the objectkey- Returns:
- the created object which has been put into the cache
-
-