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

Methods
`String` `getAffinityKeyFieldName()` Gets affinity key field name.
`String` `getTypeName()` Sets type name for which affinity field name is being defined.
`CacheKeyConfiguration` `setAffinityKeyFieldName(String affKeyFieldName)` Sets affinity key field name.
`CacheKeyConfiguration` `setTypeName(String typeName)`
`String` `toString()`

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

`clone, equals, finalize, getClass, hashCode, 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.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017