public class GridCacheDefaultAffinityKeyMapper extends Object implements GridCacheAffinityKeyMapper
GridCacheAffinityKeyMapped,
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 used as is.
Convenience affinity key adapter, GridCacheAffinityKey can be used in
conjunction with this mapper to automatically provide custom affinity keys for cache keys.
If non-default affinity mapper is used, is should be provided via
GridCacheConfiguration.getAffinityMapper() configuration property.
| Constructor and Description |
|---|
GridCacheDefaultAffinityKeyMapper() |
| Modifier and Type | Method and Description |
|---|---|
Object |
affinityKey(Object key)
If key class has annotation
GridCacheAffinityKeyMapped,
then the value of annotated method or field will be used to get affinity value instead
of the key itself. |
void |
reset()
Resets cache affinity mapper to its initial state.
|
public Object affinityKey(Object key)
GridCacheAffinityKeyMapped,
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.affinityKey in interface GridCacheAffinityKeyMapperkey - Key to get affinity key for.public void reset()
reset in interface GridCacheAffinityKeyMapperCopyright © 2014. All rights reserved.