Class AffinityPartitioner
java.lang.Object
org.infinispan.distribution.ch.impl.HashFunctionPartitioner
org.infinispan.distribution.ch.impl.AffinityPartitioner
- All Implemented Interfaces:
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
-
Field Summary
Fields inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
hashFunction, numSegments -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
bitsToUse, equals, getHash, getHashForKey, getSegmentForHash, hashCode, init, init, init, instance, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.distribution.ch.KeyPartitioner
applyAsInt, matches
-
Constructor Details
-
AffinityPartitioner
public AffinityPartitioner()
-
-
Method Details
-
getSegment
Description copied from interface:KeyPartitionerObtains the segment for a key. Must be thread-safe.- Specified by:
getSegmentin interfaceKeyPartitioner- Overrides:
getSegmentin classHashFunctionPartitioner
-