com.github.zhangxd1989.basetool.bloomfilter.filter.RSFilter Maven / Gradle / Ivy
package com.github.zhangxd1989.basetool.bloomfilter.filter;
import com.github.zhangxd1989.basetool.util.HashUtil;
/**
* RS Bloom过滤器
*
* @author sheldon
*/
public class RSFilter extends AbstractFilter {
public RSFilter(long maxValue, int machineNum) {
super(maxValue, machineNum);
}
public RSFilter(long maxValue) {
super(maxValue);
}
@Override
public long hash(String str) {
return HashUtil.rsHash(str) % size;
}
}