org.apache.ignite.cache

## Class CacheKeyConfiguration

- java.lang.Object
- - org.apache.ignite.cache.CacheKeyConfiguration

- All Implemented Interfaces:
    Serializable

      public class CacheKeyConfiguration
      extends Object
      implements Serializable

  Configuration defining various aspects of cache keys without explicit usage of annotations on user classes.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CacheKeyConfiguration()` Creates an empty cache key configuration that should be populated via setters.
    `CacheKeyConfiguration(Class keyCls)`
    `CacheKeyConfiguration(String typeName, String affKeyFieldName)` Creates cache key configuration with given type name and affinity field name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getAffinityKeyFieldName()` Gets affinity key field name.
    `String` | `getTypeName()` Sets type name for which affinity field name is being defined.
    `int` | `hashCode()`
    `CacheKeyConfiguration` | `setAffinityKeyFieldName(String affKeyFieldName)` Sets affinity key field name.
    `CacheKeyConfiguration` | `setTypeName(String typeName)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### CacheKeyConfiguration

          public CacheKeyConfiguration()

      Creates an empty cache key configuration that should be populated via setters.

    - #### CacheKeyConfiguration

          public CacheKeyConfiguration(Class keyCls)

      Parameters:
        `keyCls` - Key class.

    - #### CacheKeyConfiguration

          public CacheKeyConfiguration(String typeName,
                                       String affKeyFieldName)

      Creates cache key configuration with given type name and affinity field name.
      Parameters:
        `typeName` - Type name.
        `affKeyFieldName` - Affinity field name.

  - ### Method Detail

    - #### getTypeName

          public String getTypeName()

      Sets type name for which affinity field name is being defined.
      Returns:
        Type name.

    - #### setTypeName

          public CacheKeyConfiguration setTypeName(String typeName)

      Parameters:
        `typeName` - Type name for which affinity field name is being defined.
      Returns:
        `this` for chaining.

    - #### getAffinityKeyFieldName

          public String getAffinityKeyFieldName()

      Gets affinity key field name.
      Returns:
        Affinity key field name.

    - #### setAffinityKeyFieldName

          public CacheKeyConfiguration setAffinityKeyFieldName(String affKeyFieldName)

      Sets affinity key field name.
      Parameters:
        `affKeyFieldName` - Affinity key field name.
      Returns:
        `this` for chaining.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021