Interface CuckooFilterCommands
- All Known Subinterfaces:
RedisBloomCommands,RedisModuleCommands
- All Known Implementing Classes:
JedisCluster,JedisPooled,JedisSentineled,JedisSharding,UnifiedJedis
public interface CuckooFilterCommands
Interface for RedisBloom Cuckoo Filter Commands
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCF.ADD Adds an item to the cuckoo filter, creating the filter if it does not existbooleanCF.ADDNX Adds an item to the cuckoo filter, only if it does not exist yetlongCF.COUNT Returns the number of times an item may be in the filter.booleanCF.DEL Deletes an item once from the filter.booleanCF.EXISTS Check if an item exists in a Cuckoo FilterCF.INFO Return information about filterCF.INSERT Adds one or more items to a cuckoo filter, creating it if it does not exist yet.cfInsert(String key, CFInsertParams insertParams, String... items) CF.INSERT Adds one or more items to a cuckoo filter, using the passed optionscfInsertNx(String key, String... items) CF.INSERTNX Adds one or more items to a cuckoo filter, only if it does not exist yetcfInsertNx(String key, CFInsertParams insertParams, String... items) CF.INSERTNX Adds one or more items to a cuckoo filter, using the passed optionscfLoadChunk(String key, long iterator, byte[] data) CF.LOADCHUNK Restores a filter previously saved using SCANDUMP.CF.MEXISTS {key} {item ...}CF.RESERVE Creates a Cuckoo Filter under key with the given parameterscfReserve(String key, long capacity, CFReserveParams reserveParams) CF.RESERVE Creates a Cuckoo Filter under key with the given parameterscfScanDump(String key, long iterator) CF.SCANDUMP Begins an incremental save of the cuckoo filter.
-
Method Details
-
cfReserve
CF.RESERVE Creates a Cuckoo Filter under key with the given parameters- Parameters:
key- The name of the filtercapacity-- Returns:
- OK
-
cfReserve
CF.RESERVE Creates a Cuckoo Filter under key with the given parameters- Parameters:
key- The name of the filtercapacity-reserveParams- An instance of CFReserveParams containing the options- Returns:
- OK
-
cfAdd
CF.ADD Adds an item to the cuckoo filter, creating the filter if it does not exist- Parameters:
key- The name of the filteritem- The item to add- Returns:
- true on success, false otherwise
-
cfAddNx
CF.ADDNX Adds an item to the cuckoo filter, only if it does not exist yet- Parameters:
key- The name of the filteritem- The item to add- Returns:
- true if the item was added to the filter, false if the item already exists.
-
cfInsert
CF.INSERT Adds one or more items to a cuckoo filter, creating it if it does not exist yet.- Parameters:
key- The name of the filteritems- One or more items to add- Returns:
- true if the item was successfully inserted, false if an error occurred
-
cfInsert
CF.INSERT Adds one or more items to a cuckoo filter, using the passed options- Parameters:
key- The name of the filterinsertParams- An instance of CFInsertParams containing the optionsitems- One or more items to add- Returns:
- true if the item was successfully inserted, false if an error occurred
-
cfInsertNx
CF.INSERTNX Adds one or more items to a cuckoo filter, only if it does not exist yet- Parameters:
key- The name of the filteritems- One or more items to add- Returns:
- true if the item was added to the filter, false if the item already exists.
-
cfInsertNx
CF.INSERTNX Adds one or more items to a cuckoo filter, using the passed options- Parameters:
key- The name of the filterinsertParams- An instance of CFInsertParams containing the options (CAPACITY/NOCREATE)items- One or more items to add- Returns:
- true if the item was added to the filter, false if the item already exists.
-
cfExists
CF.EXISTS Check if an item exists in a Cuckoo Filter- Parameters:
key- The name of the filteritem- The item to check for- Returns:
- false if the item certainly does not exist, true if the item may exist.
-
cfMExists
CF.MEXISTS {key} {item ...}- Parameters:
key- The name of the filteritems- Items to check for (non empty sequence)- Returns:
- a list of booleans where false if the item certainly does not exist, true if the item may exist.
-
cfDel
CF.DEL Deletes an item once from the filter. If the item exists only once, it will be removed from the filter. If the item was added multiple times, it will still be present.- Parameters:
key- The name of the filteritem- The item to delete from the filter- Returns:
- true if the item has been deleted, false if the item was not found.
-
cfCount
CF.COUNT Returns the number of times an item may be in the filter.- Parameters:
key- The name of the filteritem- The item to count- Returns:
- The number of times the item exists in the filter
-
cfScanDump
CF.SCANDUMP Begins an incremental save of the cuckoo filter. This is useful for large cuckoo filters which cannot fit into the normal SAVE and RESTORE model. The Iterator is passed as input to the next invocation of SCANDUMP . If Iterator is 0, the iteration has completed.- Parameters:
key- Name of the filteriterator- This is either 0, or the iterator from a previous invocation of this command- Returns:
- a Map.Entry containing the Iterator and Data.
-
cfLoadChunk
CF.LOADCHUNK Restores a filter previously saved using SCANDUMP.- Parameters:
key- Name of the filter to restoreiterator- Iterator from CF.SCANDUMPdata- Data from CF.SCANDUMP- Returns:
- OK
-
cfInfo
CF.INFO Return information about filter- Parameters:
key- Name of the filter to restore- Returns:
- A Map containing Size, Number of buckets, Number of filter, Number of items inserted, Number of items deleted, Bucket size, Expansion rate, Max iteration
-