HomeSort by relevance Sort by last modified time
    Searched full:consistenthash (Results 1 - 2 of 2) sorted by null

  /external/guava/guava-tests/test/com/google/common/hash/
HashingTest.java 54 int b = Hashing.consistentHash(hashCode, shards);
77 int chosen = Hashing.consistentHash(h, shards);
90 Hashing.consistentHash(5L, 0);
103 assertEquals(Hashing.consistentHash(equivLong, 5555), Hashing.consistentHash(hashCode, 5555));
  /external/guava/guava/src/com/google/common/hash/
Hashing.java 161 * {@code consistentHash(h, n)} equals:
165 * <li>{@code consistentHash(h, n - 1)}, otherwise (probability {@code 1 - 1/n})
171 public static int consistentHash(HashCode hashCode, int buckets) {
172 return consistentHash(padToLong(hashCode), buckets);
178 * {@code consistentHash(h, n)} equals:
182 * <li>{@code consistentHash(h, n - 1)}, otherwise (probability {@code 1 - 1/n})
188 public static int consistentHash(long input, int buckets) {

Completed in 139 milliseconds