Class CacheDefaultBinaryAffinityKeyMapper
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper
-
- org.apache.ignite.internal.processors.cache.CacheDefaultBinaryAffinityKeyMapper
-
- All Implemented Interfaces:
Serializable,AffinityKeyMapper
public class CacheDefaultBinaryAffinityKeyMapper 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 Description CacheDefaultBinaryAffinityKeyMapper(@Nullable CacheKeyConfiguration[] cacheKeyCfgs)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectaffinityKey(Object key)If key class has annotationAffinityKeyMapped, then the value of annotated method or field will be used to get affinity value instead of the key itself.@Nullable BinaryFieldaffinityKeyField(int typeId)Get affinity field override for type.@Nullable BinaryFieldaffinityKeyField(String typeName)Get affinity field override for type.voidignite(Ignite ignite)-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheDefaultAffinityKeyMapper
affinityKeyPropertyName, reset
-
-
-
-
Constructor Detail
-
CacheDefaultBinaryAffinityKeyMapper
public CacheDefaultBinaryAffinityKeyMapper(@Nullable @Nullable CacheKeyConfiguration[] cacheKeyCfgs)Constructor.- Parameters:
cacheKeyCfgs- Cache key configurations.
-
-
Method Detail
-
affinityKey
public Object affinityKey(Object key)
If key class has annotationAffinityKeyMapped, 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:
affinityKeyin interfaceAffinityKeyMapper- Overrides:
affinityKeyin classGridCacheDefaultAffinityKeyMapper- Parameters:
key- Key to get affinity key for.- Returns:
- Affinity key for given key.
-
affinityKeyField
@Nullable public @Nullable BinaryField affinityKeyField(String typeName)
Get affinity field override for type.- Parameters:
typeName- Type name.- Returns:
- Affinity field override if any.
-
affinityKeyField
@Nullable public @Nullable BinaryField affinityKeyField(int typeId)
Get affinity field override for type.- Parameters:
typeId- Type ID.- Returns:
- Affinity field override if any.
-
ignite
public void ignite(Ignite ignite)
- Overrides:
ignitein classGridCacheDefaultAffinityKeyMapper- Parameters:
ignite- Ignite.
-
-