Class StoredCacheData
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.StoredCacheData
-
- All Implemented Interfaces:
Serializable,CdcCacheEvent
public class StoredCacheData extends Object implements Serializable, CdcCacheEvent
Cache data to write to and read fromIgnitePageStoreManager. In a nutshell, contains (most importantly)CacheConfigurationand additional information about cache which is not a part of configuration. This class isSerializableand is intended to be read-written withJdkMarshallerin order to be serialization wise agnostic to further additions or removals of fields.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StoredCacheData(CacheConfiguration<?,?> ccfg)Constructor.StoredCacheData(StoredCacheData cacheData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheConfigurationEnrichmentcacheConfigurationEnrichment()StoredCacheDatacacheConfigurationEnrichment(CacheConfigurationEnrichment ccfgEnrichment)intcacheId()CacheConfiguration<?,?>config()voidconfig(CacheConfiguration<?,?> ccfg)CacheConfiguration<?,?>configuration()Note,CacheConfiguration.getQueryEntities()value not changed on table schema change.GroupKeyEncryptedgroupKeyEncrypted()voidgroupKeyEncrypted(GroupKeyEncrypted grpKeyEncrypted)booleanhasOldCacheConfigurationFormat()Collection<QueryEntity>queryEntities()Returns current state of configuredQueryEntity.voidqueryEntities(Collection<QueryEntity> qryEntities)booleansql()StoredCacheDatasql(boolean sql)StringtoString()StoredCacheDatawithSplittedCacheConfig(CacheConfigurationSplitter splitter)Splits the corresponding cache configuration into parts with the given splitter.
-
-
-
Constructor Detail
-
StoredCacheData
public StoredCacheData(CacheConfiguration<?,?> ccfg)
Constructor.- Parameters:
ccfg- Cache configuration.
-
StoredCacheData
public StoredCacheData(StoredCacheData cacheData)
- Parameters:
cacheData- Cache data.
-
-
Method Detail
-
config
public void config(CacheConfiguration<?,?> ccfg)
- Parameters:
ccfg- Cache configuration.
-
config
public CacheConfiguration<?,?> config()
- Returns:
- Cache configuration.
-
queryEntities
public Collection<QueryEntity> queryEntities()
Description copied from interface:CdcCacheEventReturns current state of configuredQueryEntity.QueryEntitycan be changed by executing DDL on SQL tables. Note,CacheConfiguration.getQueryEntities()returns initial definition ofQueryEntity.- Specified by:
queryEntitiesin interfaceCdcCacheEvent- Returns:
- Query entities.
-
queryEntities
public void queryEntities(Collection<QueryEntity> qryEntities)
- Parameters:
qryEntities- Query entities.
-
sql
public boolean sql()
- Returns:
- SQL flag -
trueif cache was created withCREATE TABLE.
-
sql
public StoredCacheData sql(boolean sql)
- Parameters:
sql- SQL flag -trueif cache was created withCREATE TABLE.
-
groupKeyEncrypted
public GroupKeyEncrypted groupKeyEncrypted()
- Returns:
- Ciphered encryption key for this cache or cache group.
Nullif not encrypted.
-
groupKeyEncrypted
public void groupKeyEncrypted(GroupKeyEncrypted grpKeyEncrypted)
- Parameters:
grpKeyEncrypted- Ciphered encryption key for this cache or cache group.
-
cacheConfigurationEnrichment
public StoredCacheData cacheConfigurationEnrichment(CacheConfigurationEnrichment ccfgEnrichment)
- Parameters:
ccfgEnrichment- Configuration enrichment.
-
cacheConfigurationEnrichment
public CacheConfigurationEnrichment cacheConfigurationEnrichment()
- Returns:
- Configuration enrichment.
-
hasOldCacheConfigurationFormat
public boolean hasOldCacheConfigurationFormat()
- Returns:
trueif configuration enrichment is available.
-
withSplittedCacheConfig
public StoredCacheData withSplittedCacheConfig(CacheConfigurationSplitter splitter)
Splits the corresponding cache configuration into parts with the given splitter.- Parameters:
splitter- Cache configuration splitter.
-
cacheId
public int cacheId()
- Specified by:
cacheIdin interfaceCdcCacheEvent- Returns:
- Cache ID.
- See Also:
CacheView.cacheId()
-
configuration
public CacheConfiguration<?,?> configuration()
Note,CacheConfiguration.getQueryEntities()value not changed on table schema change. Current table schema can be obtained byCdcCacheEvent.queryEntities().- Specified by:
configurationin interfaceCdcCacheEvent- Returns:
- Initial cache configuration.
-
-