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
Constructors -
Method Summary
Methods inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
equals, getHash, getSegmentEndHashes, hashCode, init, init, 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
-