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 int
creationCounter
int
expirationCounter
int
invalidationCounter
int
requestCounter
-
Constructor Summary
Constructors Constructor Description TestObjectCacheManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
handleCreation(ObjectKey<T> objectKey)
Default implementation of how objects should be created.protected void
handleExpiration(ObjectKey<T> objectKey)
Default implementation simply removes the expired object.protected void
handleInvalidation(ObjectKey<T> objectKey)
Default implementation simply removed the invalidated object.protected T
handleRequest(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:AbstractObjectCacheManager
Default implementation simply removes the expired object.- Overrides:
handleExpiration
in classAbstractObjectCacheManager<T>
-
handleInvalidation
protected void handleInvalidation(ObjectKey<T> objectKey)
Description copied from class:AbstractObjectCacheManager
Default implementation simply removed the invalidated object.- Overrides:
handleInvalidation
in classAbstractObjectCacheManager<T>
-
handleRequest
protected T handleRequest(ObjectKey<T> objectKey)
Description copied from class:AbstractObjectCacheManager
Default implementation simply requests the cache with the given key.- Overrides:
handleRequest
in classAbstractObjectCacheManager<T>
-
handleCreation
protected T handleCreation(ObjectKey<T> objectKey)
Description copied from class:AbstractObjectCacheManager
Default 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:
handleCreation
in classAbstractObjectCacheManager<T>
- Parameters:
objectKey
- the objectkey- Returns:
- the created object which has been put into the cache
-
-