Class DynamicCacheDescriptor


  • public class DynamicCacheDescriptor
    extends Object
    Cache start descriptor.
    • 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 - True if this is template configuration.
        rcvdFrom - ID of node provided cache configuration
        staticCfg - True if cache statically configured.
        sql - SQL flag - whether the cache is created by an SQL command such as CREATE TABLE.
        deploymentId - Deployment ID.
        schema - Query schema.
        cacheCfgEnrichment - Cache configuration enrichment.
    • Method Detail

      • groupId

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

        public int cacheId()
        Returns:
        Cache ID.
      • template

        public boolean template()
        Returns:
        True if this is template configuration.
      • cacheType

        public CacheType cacheType()
        Returns:
        Cache type.
      • deploymentId

        public IgniteUuid deploymentId()
        Returns:
        Start ID.
      • staticallyConfigured

        public boolean staticallyConfigured()
        Returns:
        True if 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.
      • 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 null if 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:
        true if applying was success and false otherwise.
      • cacheConfigurationEnrichment

        public CacheConfigurationEnrichment cacheConfigurationEnrichment()
        Returns:
        Cache configuration enrichment.
      • isConfigurationEnriched

        public boolean isConfigurationEnriched()
        Returns:
        True if configuration is already enriched.
      • configurationEnriched

        public void configurationEnriched​(boolean cacheCfgEnriched)
        Parameters:
        cacheCfgEnriched - Flag indicates that configuration is enriched.