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 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 Modifier and Type Method Description booleanaffinityNode()@Nullable GridCacheContext<K,V>cacheContext()intcacheId()voidclearCacheContext()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).CacheConfiguration<K,V>config()IgniteUuiddynamicDeploymentId()intgroupId()StringgroupName()Returns name of cache group.voidinitCacheContext(GridCacheContext<K,V> cctx)Set real cache context in case cache has been fully initted and start.booleanisCacheContextInited()booleanisClientCache()Stringname()voidonSchemaAddQueryEntity(SchemaAddQueryEntityOperation op)Apply changes fromSchemaAddQueryEntityOperation.StringtoString()
-
-
-
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<K,V> config()
- Returns:
- Cache configuration.
-
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:
truein case affinity node.
-
cacheContext
@Nullable public @Nullable GridCacheContext<K,V> cacheContext()
- Returns:
- Cache context.
nullfor 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:
trueFor client cache.
-
isCacheContextInited
public boolean isCacheContextInited()
- Returns:
trueIf Cache context is initted.
-
onSchemaAddQueryEntity
public void onSchemaAddQueryEntity(SchemaAddQueryEntityOperation op)
Apply changes fromSchemaAddQueryEntityOperation.- Parameters:
op- Add query entity schema operation.
-
-