T
- - type of objectRExpirable
, RExpirableAsync
, RObject
, RObjectAsync
RedissonBloomFilter
public interface RBloomFilter<T> extends RExpirable
Modifier and Type | Method | 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, expireAt, expireAt, remainTimeToLive
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, touch, unlink
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
boolean 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–2018 The Redisson Project. All rights reserved.