org.apache.ignite.internal.processors.cache

## Class CacheConfigurationEnricher

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.CacheConfigurationEnricher

    public class CacheConfigurationEnricher
    extends Object

The responsibility of this class is to enrich cache configuration with stored enrichment, in other words it allows to deserialize fields of `CacheConfiguration` that are marked with `SerializeSeparately`.

### Constructor Summary

Constructors
Constructor and Description
`CacheConfigurationEnricher(GridKernalContext ctx, Marshaller marshaller, ClassLoader clsLdr)` Creates a new instance of enricher.

### Method Summary

All Methods Instance Methods Concrete Methods
`CacheConfiguration<?,?>` `enrich(CacheConfiguration<?,?> ccfg, @Nullable CacheConfigurationEnrichment enrichment, boolean affinityNode)` Enriches cache configuration fields with deserialized values from given `enrichment`.
`CacheGroupDescriptor` `enrich(CacheGroupDescriptor desc, boolean affinityNode)` Enriches descriptor cache configuration with stored enrichment.
`DynamicCacheDescriptor` `enrich(DynamicCacheDescriptor desc, boolean affinityNode)` Enriches descriptor cache configuration with stored enrichment.
`CacheConfiguration<?,?>` `enrichFully(CacheConfiguration<?,?> ccfg, CacheConfigurationEnrichment enrichment)`

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

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

### Constructor Detail

#### CacheConfigurationEnricher

    public CacheConfigurationEnricher(GridKernalContext ctx,
                                      Marshaller marshaller,
                                      ClassLoader clsLdr)

Creates a new instance of enricher.

Parameters:
  `ctx` - Kernal context.
  `marshaller` - Marshaller to be used for deserializing parts on `CacheConfiguration`.
  `clsLdr` - Class loader to be used for deserializing parts on `CacheConfiguration`.

### Method Detail

#### enrich

    public DynamicCacheDescriptor enrich(DynamicCacheDescriptor desc,
                                         boolean affinityNode)

Enriches descriptor cache configuration with stored enrichment.

Parameters:
  `desc` - Cache desriptor.
  `affinityNode` - `true` if enrichment is happened on affinity node.

#### enrich

    public CacheGroupDescriptor enrich(CacheGroupDescriptor desc,
                                       boolean affinityNode)

Enriches descriptor cache configuration with stored enrichment.

Parameters:
  `desc` - Cache group descriptor to be enriched.
  `affinityNode` - `true` if enrichment is happened on affinity node.

#### enrich

    public CacheConfiguration<?,?> enrich(CacheConfiguration<?,?> ccfg,
                                          @Nullable
                                          @Nullable CacheConfigurationEnrichment enrichment,
                                          boolean affinityNode)

Enriches cache configuration fields with deserialized values from given `enrichment`.

Parameters:
  `ccfg` - Cache configuration to enrich.
  `enrichment` - Cache configuration enrichment.
  `affinityNode` - `true` if enrichment is happened on affinity node.
Returns:
  Enriched cache configuration.

#### enrichFully

    public CacheConfiguration<?,?> enrichFully(CacheConfiguration<?,?> ccfg,
                                               CacheConfigurationEnrichment enrichment)

Parameters:
  `ccfg` - Cache configuration to enrich.
  `enrichment` - Cache configuration enrichment.
Returns:
  Enriched cache configuration.
See Also:
  `Does the same thing but without skipping any fields.`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023