From 457b1ae64aba85e6d784235daa11e21f23390e6f Mon Sep 17 00:00:00 2001 From: calvin1978 Date: Tue, 24 Jan 2017 00:33:45 +0800 Subject: [PATCH] remove useless hashfunction --- .../springside/modules/utils/text/HashUtil.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/modules/utils/src/main/java/org/springside/modules/utils/text/HashUtil.java b/modules/utils/src/main/java/org/springside/modules/utils/text/HashUtil.java index bc5f5be8e..867f22cbe 100644 --- a/modules/utils/src/main/java/org/springside/modules/utils/text/HashUtil.java +++ b/modules/utils/src/main/java/org/springside/modules/utils/text/HashUtil.java @@ -33,8 +33,6 @@ * * 其中crc32基于JDK, murmurhash基于guava * - * 3.无需哈希环的一致性哈希 - * * @author calvin */ public abstract class HashUtil { @@ -246,18 +244,4 @@ public static long murmur128AsLong(@NotNull byte[] input) { public static long murmur128AsLong(@NotNull String input) { return Hashing.murmur3_128(MURMUR_SEED).hashString(input, Charsets.UTF_8).asLong(); } - - ///////////////// 一致性哈希////////// - - /** - * 一致性哈希算法,无需构造一致性哈希环的 - * - * @param input 输入值 - * @param buckets 桶的数量, 必须>0 - * @return 分配到的桶的index,从0开始 - */ - public static int consistentHash(long input, int buckets) { - return Hashing.consistentHash(input, buckets); - } - }