io.polaris.core.hash.ConsistentHash Maven / Gradle / Ivy
package io.polaris.core.hash;
import java.util.Collection;
import java.util.SortedMap;
import java.util.TreeMap;
/**
* 一致性Hash算法
* 算法详解:http://blog.csdn.net/sparkliang/article/details/5279393
* 算法实现:https://weblogs.java.net/blog/2007/11/27/consistent-hashing
*
* @author xiaoleilu
* @author Qt
* @since 1.8, Aug 01, 2023
*/
public class ConsistentHash {
/** Hash计算对象,用于自定义hash算法 */
Hash32