org.apache.ignite.internal.processors.cache.portable

## Class CacheDefaultPortableAffinityKeyMapper

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper
  - - org.apache.ignite.internal.processors.cache.portable.CacheDefaultPortableAffinityKeyMapper

All Implemented Interfaces:
  Serializable, AffinityKeyMapper

    public class CacheDefaultPortableAffinityKeyMapper
    extends GridCacheDefaultAffinityKeyMapper

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper

`ignite, log`

### Constructor Summary

Constructors
Constructor and Description
`CacheDefaultPortableAffinityKeyMapper()`

### Method Summary

Methods
`Object` `affinityKey(Object key)` If key class has annotation `AffinityKeyMapped`, then the value of annotated method or field will be used to get affinity value instead of the key itself.

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper

`reset`

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

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

### Constructor Detail

#### CacheDefaultPortableAffinityKeyMapper

    public CacheDefaultPortableAffinityKeyMapper()

### Method Detail

#### affinityKey

    public Object affinityKey(Object key)

If key class has annotation `AffinityKeyMapped`, then the value of annotated method or field will be used to get affinity value instead of the key itself. If there is no annotation, then the key is returned as is.

Specified by:
  `affinityKey` in interface `AffinityKeyMapper`
Overrides:
  `affinityKey` in class `GridCacheDefaultAffinityKeyMapper`
Parameters:
  `key` - Key to get affinity key for.
Returns:
  Affinity key for given key.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015