Class BlockingCuckooCommandsImpl<K,V>
- java.lang.Object
-
- io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
-
- io.quarkus.redis.runtime.datasource.BlockingCuckooCommandsImpl<K,V>
-
- All Implemented Interfaces:
CuckooCommands<K,V>,RedisCommands
public class BlockingCuckooCommandsImpl<K,V> extends AbstractRedisCommandGroup implements CuckooCommands<K,V>
-
-
Field Summary
-
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
ds, timeout
-
-
Constructor Summary
Constructors Constructor Description BlockingCuckooCommandsImpl(RedisDataSource ds, ReactiveCuckooCommands<K,V> reactive, Duration timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcfadd(K key, V value)Execute the command CF.ADD.booleancfaddnx(K key, V value)Execute the command CF.ADDNX.longcfcount(K key, V value)Execute the command CF.COUNT.booleancfdel(K key, V value)Execute the command CF.DEL.booleancfexists(K key, V value)Execute the command CF.EXISTS.voidcfinsert(K key, CfInsertArgs args, V... values)Execute the command CF.INSERT.voidcfinsert(K key, V... values)Execute the command CF.INSERT.List<Boolean>cfinsertnx(K key, CfInsertArgs args, V... values)Execute the command CF.INSERTNX.List<Boolean>cfinsertnx(K key, V... values)Execute the command CF.INSERTNX.List<Boolean>cfmexists(K key, V... values)Execute the command CF.MEXISTS.voidcfreserve(K key, long capacity)Execute the command CF.RESERVE.voidcfreserve(K key, long capacity, CfReserveArgs args)Execute the command CF.RESERVE.-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
getDataSource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommands
getDataSource
-
-
-
-
Constructor Detail
-
BlockingCuckooCommandsImpl
public BlockingCuckooCommandsImpl(RedisDataSource ds, ReactiveCuckooCommands<K,V> reactive, Duration timeout)
-
-
Method Detail
-
cfadd
public void cfadd(K key, V value)
Description copied from interface:CuckooCommandsExecute the command CF.ADD. Summary: Adds the specified element to the specified Cuckoo filter. Group: cuckooIf the cuckoo filter does not exist, it creates a new one.
- Specified by:
cfaddin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalue- the value, must not benull
-
cfaddnx
public boolean cfaddnx(K key, V value)
Description copied from interface:CuckooCommandsExecute the command CF.ADDNX. Summary: Adds an item to a cuckoo filter if the item did not exist previously. Group: cuckooIf the cuckoo filter does not exist, it creates a new one.
- Specified by:
cfaddnxin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalue- the value, must not benull- Returns:
trueif the value was added to the filter,falseotherwise
-
cfcount
public long cfcount(K key, V value)
Description copied from interface:CuckooCommandsExecute the command CF.COUNT. Summary: Returns the number of times an item may be in the filter. Because this is a probabilistic data structure, this may not necessarily be accurate. Group: cuckoo- Specified by:
cfcountin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalue- the value, must not benull- Returns:
- a Uni producing the count of possible matching copies of the value in the filter
-
cfdel
public boolean cfdel(K key, V value)
Description copied from interface:CuckooCommandsExecute the command CF.DEL. Summary: 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. Group: cuckoo- Specified by:
cfdelin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalue- the value, must not benull- Returns:
- a Uni producing
trueif the value was removed from the filter,falseotherwise (the value was not found in the filter)
-
cfexists
public boolean cfexists(K key, V value)
Description copied from interface:CuckooCommandsExecute the command CF.EXISTS. Summary: Check if an item exists in a Cuckoo filter Group: cuckoo- Specified by:
cfexistsin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalue- the value, must not benull- Returns:
- a Uni producing
trueif the value was found in the filter,falseotherwise.
-
cfinsert
public void cfinsert(K key, V... values)
Description copied from interface:CuckooCommandsExecute the command CF.INSERT. Summary: Adds one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not exist yet. Group: cuckoo- Specified by:
cfinsertin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalues- the values, must not benull, must not be empty, must not containnull
-
cfinsert
public void cfinsert(K key, CfInsertArgs args, V... values)
Description copied from interface:CuckooCommandsExecute the command CF.INSERT. Summary: Adds one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not exist yet. Group: cuckoo- Specified by:
cfinsertin interfaceCuckooCommands<K,V>- Parameters:
key- the keyargs- the extra argumentsvalues- the values, must not benull, must not be empty, must not containnull
-
cfinsertnx
public List<Boolean> cfinsertnx(K key, V... values)
Description copied from interface:CuckooCommandsExecute the command CF.INSERTNX. Summary: Adds one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not exist yet. Group: cuckoo- Specified by:
cfinsertnxin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalues- the values, must not benull, must not be empty, must not containnull- Returns:
- a list of boolean. For each added value, the corresponding boolean is
trueif the value has been added (non-existing) orfalseif the value was already present in the filter.
-
cfinsertnx
public List<Boolean> cfinsertnx(K key, CfInsertArgs args, V... values)
Description copied from interface:CuckooCommandsExecute the command CF.INSERTNX. Summary: Adds one or more items to a cuckoo filter, allowing the filter to be created with a custom capacity if it does not exist yet. Group: cuckoo- Specified by:
cfinsertnxin interfaceCuckooCommands<K,V>- Parameters:
key- the keyargs- the extra argumentsvalues- the values, must not benull, must not be empty, must not containnull- Returns:
- a list of boolean. For each added value, the corresponding boolean is
trueif the value has been added (non-existing) orfalseif the value was already present in the filter.
-
cfmexists
public List<Boolean> cfmexists(K key, V... values)
Description copied from interface:CuckooCommandsExecute the command CF.MEXISTS. Summary: Check if an item exists in a Cuckoo filter Group: cuckoo- Specified by:
cfmexistsin interfaceCuckooCommands<K,V>- Parameters:
key- the keyvalues- the values, must not benull, must not containnull, must not be empty- Returns:
- a list of boolean indicating, for each corresponding value, if the value exists in the filter or not.
-
cfreserve
public void cfreserve(K key, long capacity)
Description copied from interface:CuckooCommandsExecute the command CF.RESERVE. Summary: Create a Cuckoo Filter as key with a single sub-filter for the initial amount of capacity for items. Group: cuckoo- Specified by:
cfreservein interfaceCuckooCommands<K,V>- Parameters:
key- the keycapacity- the capacity
-
cfreserve
public void cfreserve(K key, long capacity, CfReserveArgs args)
Description copied from interface:CuckooCommandsExecute the command CF.RESERVE. Summary: Create a Cuckoo Filter as key with a single sub-filter for the initial amount of capacity for items. Group: cuckoo- Specified by:
cfreservein interfaceCuckooCommands<K,V>- Parameters:
key- the keycapacity- the capacityargs- the extra parameters
-
-