Class DynamicCacheDescriptor
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor
-
public class DynamicCacheDescriptor extends Object
Cache start descriptor.
-
-
Constructor Summary
Constructors Constructor Description DynamicCacheDescriptor(GridKernalContext ctx, CacheConfiguration cacheCfg, CacheType cacheType, CacheGroupDescriptor grpDesc, boolean template, UUID rcvdFrom, boolean staticCfg, boolean sql, IgniteUuid deploymentId, QuerySchema schema, @Nullable CacheConfigurationEnrichment cacheCfgEnrichment)
-
Method Summary
-
-
-
Constructor Detail
-
DynamicCacheDescriptor
public DynamicCacheDescriptor(GridKernalContext ctx, CacheConfiguration cacheCfg, CacheType cacheType, CacheGroupDescriptor grpDesc, boolean template, UUID rcvdFrom, boolean staticCfg, boolean sql, IgniteUuid deploymentId, QuerySchema schema, @Nullable @Nullable CacheConfigurationEnrichment cacheCfgEnrichment)
- Parameters:
ctx- Context.cacheCfg- Cache configuration.cacheType- Cache type.grpDesc- Group descriptor.template-Trueif this is template configuration.rcvdFrom- ID of node provided cache configurationstaticCfg-Trueif cache statically configured.sql- SQL flag - whether the cache is created by an SQL command such asCREATE TABLE.deploymentId- Deployment ID.schema- Query schema.cacheCfgEnrichment- Cache configuration enrichment.
-
-
Method Detail
-
groupId
public int groupId()
- Returns:
- Cache group ID.
-
groupDescriptor
public CacheGroupDescriptor groupDescriptor()
- Returns:
- Cache group descriptor.
-
cacheId
public int cacheId()
- Returns:
- Cache ID.
-
template
public boolean template()
- Returns:
Trueif this is template configuration.
-
cacheType
public CacheType cacheType()
- Returns:
- Cache type.
-
deploymentId
public IgniteUuid deploymentId()
- Returns:
- Start ID.
-
staticallyConfigured
public boolean staticallyConfigured()
- Returns:
Trueif statically configured.
-
sql
public boolean sql()
- Returns:
- SQL flag.
-
cacheName
public String cacheName()
- Returns:
- Cache name.
-
cacheConfiguration
public CacheConfiguration cacheConfiguration()
- Returns:
- Cache configuration.
-
cacheConfiguration
public void cacheConfiguration(CacheConfiguration cacheCfg)
- Parameters:
cacheCfg- Cache config.
-
cacheObjectContext
public CacheObjectContext cacheObjectContext(IgniteCacheObjectProcessor proc) throws IgniteCheckedException
Creates and caches cache object context if needed.- Parameters:
proc- Object processor.- Returns:
- Cache object context.
- Throws:
IgniteCheckedException- If failed.
-
updatesAllowed
public boolean updatesAllowed()
- Returns:
- Updates allowed flag.
-
updatesAllowed
public void updatesAllowed(boolean updatesAllowed)
- Parameters:
updatesAllowed- Updates allowed flag.
-
receivedFrom
@Nullable public @Nullable UUID receivedFrom()
- Returns:
- ID of node provided cache configuration in discovery data.
-
startTopologyVersion
@Nullable public @Nullable AffinityTopologyVersion startTopologyVersion()
- Returns:
- Start topology version or
nullif cache configured statically.
-
startTopologyVersion
public void startTopologyVersion(AffinityTopologyVersion startTopVer)
- Parameters:
startTopVer- Start topology version.
-
schema
public QuerySchema schema()
- Returns:
- Schema.
-
schema
public void schema(QuerySchema schema)
Set schema- Parameters:
schema- Schema.
-
schemaChangeFinish
public void schemaChangeFinish(SchemaFinishDiscoveryMessage msg)
Try applying finish message.- Parameters:
msg- Message.
-
makeSchemaPatch
public QuerySchemaPatch makeSchemaPatch(StoredCacheData cacheData)
Make schema patch for this cache.- Parameters:
cacheData- Stored cache by which current schema should be expanded.- Returns:
- Patch which contains operations for expanding schema of this cache.
- See Also:
QuerySchemaPatch
-
makeSchemaPatch
public QuerySchemaPatch makeSchemaPatch(Collection<QueryEntity> target)
Make schema patch for this cache.- Parameters:
target- Query entity list which current schema should be expanded to.- Returns:
- Patch which contains operations for expanding schema of this cache.
- See Also:
QuerySchemaPatch
-
applySchemaPatch
public boolean applySchemaPatch(QuerySchemaPatch patch)
Apply query schema patch for changing current schema.- Parameters:
patch- patch to apply.- Returns:
trueif applying was success andfalseotherwise.
-
toStoredData
public StoredCacheData toStoredData(CacheConfigurationSplitter splitter)
Form aStoredCacheDatawith all data to correctly restore cache params when its configuration is read from page store. Essentially, this method takes fromDynamicCacheDescriptorall that's needed to start cache correctly, leaving out everything else.
-
cacheConfigurationEnrichment
public CacheConfigurationEnrichment cacheConfigurationEnrichment()
- Returns:
- Cache configuration enrichment.
-
isConfigurationEnriched
public boolean isConfigurationEnriched()
- Returns:
Trueif configuration is already enriched.
-
configurationEnriched
public void configurationEnriched(boolean cacheCfgEnriched)
- Parameters:
cacheCfgEnriched- Flag indicates that configuration is enriched.
-
-