public class BloomFilter
extends org.redisson.RedissonObject
| 构造器和说明 |
|---|
BloomFilter(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
BloomFilter(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
add(String item)
Adds an item to the Bloom Filter, creating the filter if it does not yet exist
|
org.redisson.api.RFuture<Boolean> |
addAsync(String item) |
boolean |
create(double errorRate,
long capacity)
Creates an empty Bloom Filter with a given desired error ratio and initial capacity
|
org.redisson.api.RFuture<Boolean> |
createAsync(double errorRate,
long capacity) |
boolean |
exists(String item)
Determines whether an item may exist in the Bloom Filter or not
|
org.redisson.api.RFuture<Boolean> |
existsAsync(String item) |
List<Boolean> |
existsMulti(String... items)
Determines if one or more items may exist in the filter or not.
|
org.redisson.api.RFuture<List<Boolean>> |
existsMultiAsync(String... items) |
BloomFilterInfo |
getInfo()
Return information about key
|
org.redisson.api.RFuture<BloomFilterInfo> |
getInfoAsync() |
List<Boolean> |
insert(InsertArgs insertArgs,
String... items)
add one or more items to the bloom filter
|
org.redisson.api.RFuture<List<Boolean>> |
insertAsync(InsertArgs insertArgs,
String... items) |
boolean |
loadChunk(ChunksData chunk)
Restores a filter previously saved using SCANDUMP
|
org.redisson.api.RFuture<Boolean> |
loadChunkAsync(ChunksData chunk) |
List<Boolean> |
madd(String... items)
Adds one or more items to the Bloom Filter
|
org.redisson.api.RFuture<List<Boolean>> |
maddAsync(String... items) |
ChunksData |
scanDump(int iter)
Begins an incremental save of the bloom filter.
|
org.redisson.api.RFuture<ChunksData> |
scanDumpAsync(int iter) |
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncpublic BloomFilter(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public BloomFilter(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public boolean create(double errorRate,
long capacity)
errorRate - The desired probability for false positives. This should be a decimal value between 0 and 1.capacity - The number of entries you intend to add to the filterpublic org.redisson.api.RFuture<Boolean> createAsync(double errorRate, long capacity)
public boolean add(String item)
item - public boolean exists(String item)
item - public List<Boolean> existsMulti(String... items)
items - public List<Boolean> insert(InsertArgs insertArgs, String... items)
insertArgs - InsertArgsitems - public org.redisson.api.RFuture<List<Boolean>> insertAsync(InsertArgs insertArgs, String... items)
public List<Boolean> madd(String... items)
items - One or more items to addpublic BloomFilterInfo getInfo()
public org.redisson.api.RFuture<BloomFilterInfo> getInfoAsync()
public ChunksData scanDump(int iter)
iter - Iterator value. This is either 0, or the iterator from a previous invocation of this commandpublic org.redisson.api.RFuture<ChunksData> scanDumpAsync(int iter)
public boolean loadChunk(ChunksData chunk)
chunk - public org.redisson.api.RFuture<Boolean> loadChunkAsync(ChunksData chunk)
Copyright © 2022. All rights reserved.