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
Constructors -
Method Summary
Methods inherited from class org.infinispan.distribution.ch.impl.HashFunctionPartitioner
equals, getHashForKey, getSegment, getSegmentForHash, 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
-
RESPHashFunctionPartitioner
public RESPHashFunctionPartitioner()
-
-
Method Details
-
getHash
- Overrides:
getHashin classHashFunctionPartitioner
-
instance
-
init
protected void init(int numSegments) - Overrides:
initin classHashFunctionPartitioner
-
bitsToUse
protected int bitsToUse()- Overrides:
bitsToUsein classHashFunctionPartitioner
-