public class StripedHashFunction<T> extends Object
It calculates the number of segments based on the concurrency level desired and hashes the object to the corresponding segments.
Constructor and Description |
---|
StripedHashFunction(org.infinispan.commons.equivalence.Equivalence<T> equivalence,
int concurrencyLevel) |
Modifier and Type | Method and Description |
---|---|
int |
getNumSegments() |
int |
hashToSegment(T object)
It calculates the segment in which the object belongs.
|
public StripedHashFunction(org.infinispan.commons.equivalence.Equivalence<T> equivalence, int concurrencyLevel)
public final int getNumSegments()
public final int hashToSegment(T object)
object
- the object to hash.getNumSegments()
-1.Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.