Searched refs:consistentHash (Results 1 – 2 of 2) sorted by relevance
/external/guava/guava-tests/test/com/google/common/hash/ |
D | HashingTest.java | 167 int b = Hashing.consistentHash(hashCode, shards); in checkConsistentHashCorrectness() 190 int chosen = Hashing.consistentHash(h, shards); in countRemaps() 203 Hashing.consistentHash(5L, 0); in testConsistentHash_outOfRange() 216 assertEquals(Hashing.consistentHash(equivLong, 5555), Hashing.consistentHash(hashCode, 5555)); in checkSameResult() 228 assertEquals(golden100[i], Hashing.consistentHash(i, 100)); in testConsistentHash_linearCongruentialGeneratorCompatibility() 230 assertEquals(6, Hashing.consistentHash(10863919174838991L, 11)); in testConsistentHash_linearCongruentialGeneratorCompatibility() 231 assertEquals(3, Hashing.consistentHash(2016238256797177309L, 11)); in testConsistentHash_linearCongruentialGeneratorCompatibility() 232 assertEquals(5, Hashing.consistentHash(1673758223894951030L, 11)); in testConsistentHash_linearCongruentialGeneratorCompatibility() 233 assertEquals(80343, Hashing.consistentHash(2, 100001)); in testConsistentHash_linearCongruentialGeneratorCompatibility() 234 assertEquals(22152, Hashing.consistentHash(2201, 100001)); in testConsistentHash_linearCongruentialGeneratorCompatibility() [all …]
|
/external/guava/guava/src/com/google/common/hash/ |
D | Hashing.java | 319 public static int consistentHash(HashCode hashCode, int buckets) { in consistentHash() method in Hashing 320 return consistentHash(hashCode.padToLong(), buckets); in consistentHash() 336 public static int consistentHash(long input, int buckets) { in consistentHash() method in Hashing
|