T - - type of objectpublic interface RBloomFilter<T> extends RExpirable
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T object)
Adds element
|
boolean |
contains(T object)
Check for element present
|
long |
count()
Calculates probabilistic number of elements already added to Bloom filter.
|
long |
getExpectedInsertions()
Returns expected amount of insertions per element.
|
double |
getFalseProbability()
Returns false probability of element presence.
|
int |
getHashIterations()
Returns hash iterations amount used per element.
|
long |
getSize()
Returns number of bits in Redis memory required by this instance
|
boolean |
tryInit(long expectedInsertions,
double falseProbability)
Initializes Bloom filter params (size and hashIterations)
calculated from
expectedInsertions and falseProbability
Stores config to Redis server. |
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLiveaddListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkclearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsyncaddListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncboolean add(T object)
object - - element to addtrue if element has been added successfully
false if element is already presentboolean contains(T object)
object - - elementtrue if element is present
false if element is not presentboolean tryInit(long expectedInsertions,
double falseProbability)
expectedInsertions and falseProbability
Stores config to Redis server.expectedInsertions - - expected amount of insertions per elementfalseProbability - - expected false probabilitytrue if Bloom filter initialized
false if Bloom filter already has been initializedlong getExpectedInsertions()
double getFalseProbability()
long getSize()
int getHashIterations()
long count()
Copyright © 2014–2021 Redisson. All rights reserved.