List of usage examples for com.google.common.hash Hashing consistentHash
public static int consistentHash(long input, int buckets)
From source file:org.hawkular.metrics.tasks.impl.TaskSchedulerImpl.java
int computeShard(String key) { HashCode hashCode = hashFunction.hashBytes(key.getBytes()); return Hashing.consistentHash(hashCode, numShards); }