Class GridCacheContextInfo<K,​V>


  • @GridToStringExclude
    public class GridCacheContextInfo<K,​V>
    extends Object
    Cache context information. Required to support query infrastructure for not started caches on non affinity nodes.
    • Constructor Detail

      • GridCacheContextInfo

        public GridCacheContextInfo​(GridCacheContext<K,​V> cctx,
                                    boolean clientCache)
        Constructor of full cache context.
        Parameters:
        cctx - Cache context.
        clientCache - Client cache or not.
      • GridCacheContextInfo

        public GridCacheContextInfo​(DynamicCacheDescriptor cacheDesc)
        Constructor of not started cache context.
        Parameters:
        cacheDesc - Cache descriptor.
    • Method Detail

      • name

        public String name()
        Returns:
        Cache name.
      • groupName

        public String groupName()
        Returns name of cache group.
        Returns:
        Cache group name.
      • groupId

        public int groupId()
        Returns:
        Cache group id.
      • cacheId

        public int cacheId()
        Returns:
        Cache id.
      • affinityNode

        public boolean affinityNode()
        Returns:
        true in case affinity node.
      • cacheContext

        @Nullable
        public @Nullable GridCacheContext<K,​V> cacheContext()
        Returns:
        Cache context. null for not started cache.
      • dynamicDeploymentId

        public IgniteUuid dynamicDeploymentId()
        Returns:
        Dynamic deployment ID.
      • initCacheContext

        public void initCacheContext​(GridCacheContext<K,​V> cctx)
        Set real cache context in case cache has been fully initted and start.
        Parameters:
        cctx - Initted cache context.
      • clearCacheContext

        public void clearCacheContext()
        Clear real cache context; the method is used on cache.close() on not-affinity nodes to set up cache on idle state (not started on client, similar to state after join client node).
      • isClientCache

        public boolean isClientCache()
        Returns:
        true For client cache.
      • isCacheContextInited

        public boolean isCacheContextInited()
        Returns:
        true If Cache context is initted.