Class AffinityPartitioner
java.lang.Object
org.infinispan.distribution.ch.impl.HashFunctionPartitioner
org.infinispan.distribution.ch.impl.AffinityPartitioner
- All Implemented Interfaces:
Cloneable
,ToIntFunction<Object>
,Matchable<KeyPartitioner>
,KeyPartitioner
Key partitioner that maps keys to segments using information contained in
AffinityTaggedKey
.
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
-
Method Summary
Methods inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
equals, getHash, getSegmentEndHashes, hashCode, init, 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
-
Constructor Details
-
AffinityPartitioner
public AffinityPartitioner()
-
-
Method Details
-
getSegment
Description copied from interface:KeyPartitioner
Obtains the segment for a key. Must be thread-safe.- Specified by:
getSegment
in interfaceKeyPartitioner
- Overrides:
getSegment
in classHashFunctionPartitioner
-