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
  • Constructor Details

    • JaloTypeCacheUnit

      protected JaloTypeCacheUnit(Cache cache, int typecode, Object additionalKey, int invalidationType)
    • JaloTypeCacheUnit

      protected JaloTypeCacheUnit(Cache cache, int typecode, Object additionalKey)
  • Method Details

    • createKey

      public Object[] createKey()
      Specified by:
      createKey in class AbstractCacheUnit
    • getKey

      public RegistrableCacheKey getKey()
      Overrides:
      getKey in class AbstractCacheUnit
    • compute

      public abstract Object compute()
      Specified by:
      compute in class AbstractCacheUnit
    • getCached

      public 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