Class CacheObjectContext

    • Constructor Detail

      • CacheObjectContext

        public CacheObjectContext​(GridKernalContext kernalCtx,
                                  String cacheName,
                                  AffinityKeyMapper dfltAffMapper,
                                  boolean customAffMapper,
                                  boolean cpyOnGet,
                                  boolean storeVal,
                                  boolean addDepInfo,
                                  boolean binaryEnabled)
        Parameters:
        kernalCtx - Kernal context.
        dfltAffMapper - Default affinity mapper.
        cpyOnGet - Copy on get flag.
        storeVal - True if should store unmarshalled value in cache.
        addDepInfo - true if deployment info should be associated with the objects of this cache.
        binaryEnabled - Binary enabled flag.
    • Method Detail

      • cacheName

        public String cacheName()
        Returns:
        Cache name.
      • addDeploymentInfo

        public boolean addDeploymentInfo()
        Specified by:
        addDeploymentInfo in interface CacheObjectValueContext
        Returns:
        True if deployment info should be associated with the objects of this cache.
      • storeValue

        public boolean storeValue()
        Specified by:
        storeValue in interface CacheObjectValueContext
        Returns:
        True if should store unmarshalled value in cache.
      • defaultAffMapper

        public AffinityKeyMapper defaultAffMapper()
        Returns:
        Default affinity mapper.
      • customAffinityMapper

        public boolean customAffinityMapper()
        Returns:
        Whether custom affinity mapper is used.
      • unwrapBinaryIfNeeded

        public Object unwrapBinaryIfNeeded​(Object o,
                                           boolean keepBinary,
                                           boolean cpy,
                                           @Nullable
                                           @Nullable ClassLoader ldr)
        Parameters:
        o - Object to unwrap.
        keepBinary - Keep binary flag.
        cpy - Copy value flag.
        ldr - Class loader, used for deserialization from binary representation.
        Returns:
        Unwrapped object.