Package de.hybris.platform.jalo
Class JaloTypeCacheUnit
- java.lang.Object
-
- de.hybris.platform.cache.AbstractCacheUnit
-
- de.hybris.platform.jalo.JaloTypeCacheUnit
-
- All Implemented Interfaces:
CacheValueLoader
public abstract class JaloTypeCacheUnit extends AbstractCacheUnit
Cache helper class to perform caching in Jalo. is invalidated every time any item with given typecode is modified
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJaloTypeCacheUnit.JaloTypeCacheKey
-
Field Summary
-
Fields inherited from class de.hybris.platform.cache.AbstractCacheUnit
INVALIDATIONTYPE_CREATED, INVALIDATIONTYPE_MODIFIED, INVALIDATIONTYPE_MODIFIED_STRING, INVALIDATIONTYPE_REMOVED, INVALIDATIONTYPE_REMOVED_STRING, UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJaloTypeCacheUnit(Cache cache, int typecode, java.lang.Object additionalKey)protectedJaloTypeCacheUnit(Cache cache, int typecode, java.lang.Object additionalKey, int invalidationType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Objectcompute()java.lang.Object[]createKey()java.lang.ObjectgetCached()get the cached object from this cache unit.RegistrableCacheKeygetKey()-
Methods inherited from class de.hybris.platform.cache.AbstractCacheUnit
addedToCacheBeforeComputation, equals, executeInvalidation, get, getCache, getInvalidationTopicDepth, getKeyAsArray, getLoader, getTenantID, getWithoutCompute, getWithoutComputeIgnoringTransaction, hashCode, hintValue, invalidate, isCachingSupported, isValueKnown, load, removedFromCache, toString, useCache
-
-
-
-
Method Detail
-
createKey
public java.lang.Object[] createKey()
- Specified by:
createKeyin classAbstractCacheUnit
-
getKey
public RegistrableCacheKey getKey()
- Overrides:
getKeyin classAbstractCacheUnit
-
compute
public abstract java.lang.Object compute()
- Specified by:
computein classAbstractCacheUnit
-
getCached
public java.lang.Object getCached()
get the cached object from this cache unit. if it is not yet computed, this method blocks until it's computed.helper method which does exactly the same as AbstractCacheUnit.get(), but catches the exception and throws a RuntimeException (JaloSystemException) instead. because of that you don't have to add a try/catch block in your code.
- Returns:
- the object
-
-