Class AbstractRegioncacheUnit

  • All Implemented Interfaces:
    CacheValueLoader, CacheKey

    @Deprecated(since="5.0",
                forRemoval=true)
    public abstract class AbstractRegioncacheUnit
    extends java.lang.Object
    implements CacheKey, CacheValueLoader
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 5.0 this was used as utility class , favor now LegacyCacheKeyTypeUtil
    Adds CacheKey support to AbstractCacheUnit
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected CacheKey cacheKey
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected java.lang.Object typeCode
      Deprecated, for removal: This API element is subject to removal in a future version.
      Each key has value and type.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractRegioncacheUnit()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      abstract void addedToCacheBeforeComputation()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.Object calculateKeyCode​(java.lang.Object[] key)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      CacheUnitValueType getCacheValueType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      gets value type.
      CacheKey getKey()
      Deprecated, for removal: This API element is subject to removal in a future version.
      CacheKey interface implementation
      abstract java.lang.Object[] getKeyAsArray()
      Deprecated, for removal: This API element is subject to removal in a future version.
      AbstractCacheUnit methods
      CacheValueLoader getLoader()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      java.lang.String getTenantId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets tenant
      abstract java.lang.String getTenantID()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      java.lang.Object getTypeCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets code from typesystem.
      java.lang.Object load​(CacheKey key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      We do not perform compute not to hit database several times from different threads.
      Another reason is to keep lifecycle of hooks in the same order.
      java.lang.String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • typeCode

        protected java.lang.Object typeCode
        Deprecated, for removal: This API element is subject to removal in a future version.
        Each key has value and type. This field keeps type.
      • cacheKey

        protected CacheKey cacheKey
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Constructor Detail

      • AbstractRegioncacheUnit

        public AbstractRegioncacheUnit()
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • getKeyAsArray

        public abstract java.lang.Object[] getKeyAsArray()
        Deprecated, for removal: This API element is subject to removal in a future version.
        AbstractCacheUnit methods
      • addedToCacheBeforeComputation

        public abstract void addedToCacheBeforeComputation()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getTenantID

        public abstract java.lang.String getTenantID()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • load

        public final java.lang.Object load​(CacheKey key)
                                    throws CacheValueLoadException
        Deprecated, for removal: This API element is subject to removal in a future version.
        We do not perform compute not to hit database several times from different threads.
        Another reason is to keep lifecycle of hooks in the same order. addedToCacheBeforeComputation() is called here other callbacks in the RegionCacheAdapter.
        Specified by:
        load in interface CacheValueLoader
        Throws:
        CacheValueLoadException
      • getLoader

        public final CacheValueLoader getLoader()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getKey

        public final CacheKey getKey()
        Deprecated, for removal: This API element is subject to removal in a future version.
        CacheKey interface implementation
      • getTenantId

        public final java.lang.String getTenantId()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: CacheKey
        Gets tenant
        Specified by:
        getTenantId in interface CacheKey
      • getTypeCode

        public java.lang.Object getTypeCode()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Gets code from typesystem.
        Specified by:
        getTypeCode in interface CacheKey
      • getCacheValueType

        public final CacheUnitValueType getCacheValueType()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: CacheKey
        gets value type. Currently not used. To be used in hybris 5.
        Specified by:
        getCacheValueType in interface CacheKey
      • toString

        public java.lang.String toString()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        toString in class java.lang.Object
      • calculateKeyCode

        public static java.lang.Object calculateKeyCode​(java.lang.Object[] key)
        Deprecated, for removal: This API element is subject to removal in a future version.