Class RESPHashFunctionPartitioner
java.lang.Object
org.infinispan.distribution.ch.impl.HashFunctionPartitioner
org.infinispan.distribution.ch.impl.RESPHashFunctionPartitioner
- All Implemented Interfaces:
ToIntFunction<Object>
,Matchable<KeyPartitioner>
,KeyPartitioner
Implementation of
HashFunctionPartitioner
using CRC16
for use with RESP.
Note that RESP only has 14 bits worth of slots and uses remainder based bucket allocation.
Due to this we have to treat it as having only 14 bits for a hash- Since:
- 15.0
- See Also:
-
Field Summary
Fields inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
hashFunction, numSegments
-
Constructor Summary
-
Method Summary
Methods inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
equals, getHashForKey, getSegment, getSegmentForHash, 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
-
RESPHashFunctionPartitioner
public RESPHashFunctionPartitioner()
-
-
Method Details
-
getHash
- Overrides:
getHash
in classHashFunctionPartitioner
-
instance
-
init
protected void init(int numSegments) - Overrides:
init
in classHashFunctionPartitioner
-
bitsToUse
protected int bitsToUse()- Overrides:
bitsToUse
in classHashFunctionPartitioner
-