Class AffinityPartitioner
- java.lang.Object
-
- org.infinispan.distribution.ch.impl.HashFunctionPartitioner
-
- org.infinispan.distribution.ch.impl.AffinityPartitioner
-
- All Implemented Interfaces:
Cloneable,ToIntFunction<Object>,org.infinispan.commons.configuration.attributes.Matchable<KeyPartitioner>,KeyPartitioner
public class AffinityPartitioner extends HashFunctionPartitioner
Key partitioner that maps keys to segments using information contained inAffinityTaggedKey.If the segment is not defined (value -1) or the key is not an AffinityTaggedKey, will fallback to a
HashFunctionPartitioner- Since:
- 8.2
- Author:
- gustavonalle
-
-
Constructor Summary
Constructors Constructor Description AffinityPartitioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetSegment(Object key)Obtains the segment for a key.-
Methods inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
equals, getHash, getSegmentEndHashes, hashCode, init, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.distribution.ch.KeyPartitioner
applyAsInt, matches
-
-
-
-
Method Detail
-
getSegment
public int getSegment(Object key)
Description copied from interface:KeyPartitionerObtains the segment for a key. Must be thread-safe.- Specified by:
getSegmentin interfaceKeyPartitioner- Overrides:
getSegmentin classHashFunctionPartitioner
-
-