T
- public class BloomFilterRedis<T> extends BloomFilter<T>
CBloomFilterRedis
. The performance of this datastructure is very good, as operations are grouped
into fast transactions, minimizing the network overhead of all bloom filter operations to one round trip to Redis.BloomFilter.CustomHashFunction, BloomFilter.HashMethod
Constructor and Description |
---|
BloomFilterRedis(redis.clients.jedis.Jedis jedis) |
BloomFilterRedis(java.lang.String host,
int port,
double n,
double p) |
BloomFilterRedis(java.lang.String host,
int port,
int m,
int k)
Creates a new persistent Bloomfilter backed by Redis.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(byte[] value) |
void |
addAll(java.util.Collection<T> values) |
boolean |
contains(byte[] value) |
add, clear, clone, contains, containsAll, equals, getBitSet, getBitsPerElement, getBitZeroProbability, getCryptographicHashFunctionName, getFalsePositiveProbability, getHashMethod, getK, getM, hash, hashCode, intersect, isEmpty, optimalK, optimalM, setCryptographicHashFunction, setCusomtHashFunction, setHashMethod, size, toString, union
public BloomFilterRedis(java.lang.String host, int port, double n, double p)
public BloomFilterRedis(java.lang.String host, int port, int m, int k)
host
- the Redis host name or IP addressport
- the Redis portm
- The size of the bloom filter in bits.k
- The number of hash functions to use.public BloomFilterRedis(redis.clients.jedis.Jedis jedis)
public boolean add(byte[] value)
add
in class BloomFilter<T>
public void addAll(java.util.Collection<T> values)
addAll
in class BloomFilter<T>
public boolean contains(byte[] value)
contains
in class BloomFilter<T>