T
- public class CBloomFilterRedis<T> extends CBloomFilter<T>
CBloomFilter.OverflowHandler
BloomFilter.CustomHashFunction, BloomFilter.HashMethod
Constructor and Description |
---|
CBloomFilterRedis(redis.clients.jedis.Jedis jedis) |
CBloomFilterRedis(java.lang.String host,
int port,
double n,
double p) |
CBloomFilterRedis(java.lang.String host,
int port,
int m,
int k) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(byte[] value) |
void |
addAll(java.util.Collection<T> values) |
void |
clear() |
boolean |
contains(byte[] value) |
void |
makeTransient(int ttl)
Allows Redis to discard inserted objects after ttl seconds.
|
void |
remove(byte[] value)
Removes the object from the counting bloom filter.
|
clone, equals, getC, hashCode, intersect, remove, removeAll, setOverflowHandler, toString, union
add, contains, containsAll, getBitSet, getBitsPerElement, getBitZeroProbability, getCryptographicHashFunctionName, getFalsePositiveProbability, getHashMethod, getK, getM, hash, isEmpty, optimalK, optimalM, setCryptographicHashFunction, setCusomtHashFunction, setHashMethod, size
public CBloomFilterRedis(java.lang.String host, int port, double n, double p)
public CBloomFilterRedis(java.lang.String host, int port, int m, int k)
public CBloomFilterRedis(redis.clients.jedis.Jedis jedis)
public void makeTransient(int ttl)
remove(byte[])
should still be called.ttl
- the timespan in seconds after which Redis may discard an inserted elementpublic void remove(byte[] value)
CBloomFilter
remove
in class CBloomFilter<T>
value
- object to be deletedpublic void clear()
clear
in class CBloomFilter<T>
public boolean add(byte[] value)
add
in class CBloomFilter<T>
public void addAll(java.util.Collection<T> values)
addAll
in class BloomFilter<T>
public boolean contains(byte[] value)
contains
in class BloomFilter<T>