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
-
Field Summary
FieldsModifier and TypeFieldDescriptionintintintint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
Field Details
-
expirationCounter
public int expirationCounter -
invalidationCounter
public int invalidationCounter -
requestCounter
public int requestCounter -
creationCounter
public int creationCounter
-
-
Constructor Details
-
TestObjectCacheManager
public TestObjectCacheManager()
-
-
Method Details
-
handleExpiration
Description copied from class:AbstractObjectCacheManagerDefault implementation simply removes the expired object.- Overrides:
handleExpirationin classAbstractObjectCacheManager<T>
-
handleInvalidation
Description copied from class:AbstractObjectCacheManagerDefault implementation simply removed the invalidated object.- Overrides:
handleInvalidationin classAbstractObjectCacheManager<T>
-
handleRequest
Description copied from class:AbstractObjectCacheManagerDefault implementation simply requests the cache with the given key.- Overrides:
handleRequestin classAbstractObjectCacheManager<T>
-
handleCreation
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
-