Package hudson.util
Interface ConsistentHash.Hash<T>
-
- Enclosing class:
- ConsistentHash<T>
public static interface ConsistentHash.Hash<T>Hashes an object to some value.By default,
ConsistentHashusesObject.toString()on 'T' to obtain the hash, but that behavior can be changed by providing aConsistentHash.Hashimplementation.This hash function need not produce a very uniform distribution, as the output is rehashed with SHA-256. But it does need to make sure it doesn't produce the same value for two different 'T's (and that's why this returns String, not the usual int.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringhash(T t)
-