org.apache.ignite.internal.processors.cache

## Class GridCacheContextInfo<K,V>

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.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 Summary

Constructors
Constructor and Description
`GridCacheContextInfo(DynamicCacheDescriptor cacheDesc)` Constructor of not started cache context.
`GridCacheContextInfo(GridCacheContext<K,V> cctx, boolean clientCache)` Constructor of full cache context.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `affinityNode()`
`@Nullable GridCacheContext` `cacheContext()`
`int` `cacheId()`
`CacheConfiguration` `config()`
`IgniteUuid` `dynamicDeploymentId()`
`int` `groupId()`
`void` `initCacheContext(GridCacheContext<?,?> cctx)` Set real cache context in case cache has been fully initted and start.
`boolean` `isCacheContextInited()`
`boolean` `isClientCache()`
`String` `name()`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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

#### config

    public CacheConfiguration config()

Returns:
  Cache configuration.

#### name

    public String name()

Returns:
  Cache 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 cacheContext()

Returns:
  Cache context. `null` for not started cache.

#### dynamicDeploymentId

    public IgniteUuid dynamicDeploymentId()

Returns:
  Dynamic deployment ID.

#### initCacheContext

    public void initCacheContext(GridCacheContext<?,?> cctx)

Set real cache context in case cache has been fully initted and start.

Parameters:
  `cctx` - Initted cache context.

#### isClientCache

    public boolean isClientCache()

Returns:
  `true` For client cache.

#### isCacheContextInited

    public boolean isCacheContextInited()

Returns:
  `true` If Cache context is initted.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020