Package org.apache.ignite.internal.processors.cache

## 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 from `IgnitePageStoreManager`. In a nutshell, contains (most importantly) `CacheConfiguration` and additional information about cache which is not a part of configuration. This class is `Serializable` and is intended to be read-written with `JdkMarshaller` in order to be serialization wise agnostic to further additions or removals of fields.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`StoredCacheData​(CacheConfiguration<?,​?> ccfg)` Constructor.
`StoredCacheData​(StoredCacheData cacheData)`

### Method Summary

All Methods Instance Methods Concrete Methods
`CacheConfigurationEnrichment` `cacheConfigurationEnrichment()`
`StoredCacheData` `cacheConfigurationEnrichment​(CacheConfigurationEnrichment ccfgEnrichment)`
`int` `cacheId()`
`CacheConfiguration<?,​?>` `config()`
`void` `config​(CacheConfiguration<?,​?> ccfg)`
`CacheConfiguration<?,​?>` `configuration()` Note, `CacheConfiguration.getQueryEntities()` value not changed on table schema change.
`GroupKeyEncrypted` `groupKeyEncrypted()`
`void` `groupKeyEncrypted​(GroupKeyEncrypted grpKeyEncrypted)`
`boolean` `hasOldCacheConfigurationFormat()`
`Collection<QueryEntity>` `queryEntities()` Returns current state of configured `QueryEntity`.
`void` `queryEntities​(Collection<QueryEntity> qryEntities)`
`boolean` `sql()`
`StoredCacheData` `sql​(boolean sql)`
`String` `toString()`
`StoredCacheData` `withSplittedCacheConfig​(CacheConfigurationSplitter splitter)` Splits the corresponding cache configuration into parts with the given splitter.

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

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

### 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: `CdcCacheEvent`
Returns current state of configured `QueryEntity`. `QueryEntity` can be changed by executing DDL on SQL tables. Note, `CacheConfiguration.getQueryEntities()` returns initial definition of `QueryEntity`.

Specified by:
  `queryEntities` in interface `CdcCacheEvent`
Returns:
  Query entities.

#### queryEntities

    public void queryEntities​(Collection<QueryEntity> qryEntities)

Parameters:
  `qryEntities` - Query entities.

#### sql

    public boolean sql()

Returns:
  SQL flag - `true` if cache was created with `CREATE TABLE`.

#### sql

    public StoredCacheData sql​(boolean sql)

Parameters:
  `sql` - SQL flag - `true` if cache was created with `CREATE TABLE`.

#### groupKeyEncrypted

    public GroupKeyEncrypted groupKeyEncrypted()

Returns:
  Ciphered encryption key for this cache or cache group. `Null` if 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:
  `true` if 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.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### cacheId

    public int cacheId()

Specified by:
  `cacheId` in interface `CdcCacheEvent`
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 by `CdcCacheEvent.queryEntities()`.

Specified by:
  `configuration` in interface `CdcCacheEvent`
Returns:
  Initial cache configuration.