Class ReactiveCuckooCommandsImpl<K,V>
- java.lang.Object
-
- io.quarkus.redis.runtime.datasource.AbstractRedisCommands
-
- io.quarkus.redis.runtime.datasource.AbstractCuckooCommands<K,V>
-
- io.quarkus.redis.runtime.datasource.ReactiveCuckooCommandsImpl<K,V>
-
- All Implemented Interfaces:
ReactiveCuckooCommands<K,V>
,ReactiveRedisCommands
public class ReactiveCuckooCommandsImpl<K,V> extends AbstractCuckooCommands<K,V> implements ReactiveCuckooCommands<K,V>, ReactiveRedisCommands
-
-
Field Summary
-
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
marshaller, redis
-
-
Constructor Summary
Constructors Constructor Description ReactiveCuckooCommandsImpl(ReactiveRedisDataSourceImpl redis, Type k, Type v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>
cfadd(K key, V value)
Execute the command CF.ADD.io.smallrye.mutiny.Uni<Boolean>
cfaddnx(K key, V value)
Execute the command CF.ADDNX.io.smallrye.mutiny.Uni<Long>
cfcount(K key, V value)
Execute the command CF.COUNT.io.smallrye.mutiny.Uni<Boolean>
cfdel(K key, V value)
Execute the command CF.DEL.io.smallrye.mutiny.Uni<Boolean>
cfexists(K key, V value)
Execute the command CF.EXISTS.io.smallrye.mutiny.Uni<Void>
cfinsert(K key, CfInsertArgs args, V... values)
Execute the command CF.INSERT.io.smallrye.mutiny.Uni<Void>
cfinsert(K key, V... values)
Execute the command CF.INSERT.io.smallrye.mutiny.Uni<List<Boolean>>
cfinsertnx(K key, CfInsertArgs args, V... values)
Execute the command CF.INSERTNX.io.smallrye.mutiny.Uni<List<Boolean>>
cfinsertnx(K key, V... values)
Execute the command CF.INSERTNX.io.smallrye.mutiny.Uni<List<Boolean>>
cfmexists(K key, V... values)
Execute the command CF.MEXISTS.io.smallrye.mutiny.Uni<Void>
cfreserve(K key, long capacity)
Execute the command CF.RESERVE.io.smallrye.mutiny.Uni<Void>
cfreserve(K key, long capacity, CfReserveArgs args)
Execute the command CF.RESERVE.ReactiveRedisDataSource
getDataSource()
-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractCuckooCommands
_cfadd, _cfaddnx, _cfcount, _cfdel, _cfexists, _cfinsert, _cfinsert, _cfinsertnx, _cfinsertnx, _cfmexists, _cfreserve, _cfreserve
-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
execute, isMap
-
-
-
-
Constructor Detail
-
ReactiveCuckooCommandsImpl
public ReactiveCuckooCommandsImpl(ReactiveRedisDataSourceImpl redis, Type k, Type v)
-
-
Method Detail
-
getDataSource
public ReactiveRedisDataSource getDataSource()
- Specified by:
getDataSource
in interfaceReactiveRedisCommands
- Returns:
- the data source.
-
cfadd
public io.smallrye.mutiny.Uni<Void> cfadd(K key, V value)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfadd
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyvalue
- the value, must not benull
- Returns:
- a uni producing
null
when the operation completes
-
cfaddnx
public io.smallrye.mutiny.Uni<Boolean> cfaddnx(K key, V value)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfaddnx
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyvalue
- the value, must not benull
- Returns:
- a Uni producing
true
if the value was added to the filter,false
otherwise
-
cfcount
public io.smallrye.mutiny.Uni<Long> cfcount(K key, V value)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfcount
in interfaceReactiveCuckooCommands<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 io.smallrye.mutiny.Uni<Boolean> cfdel(K key, V value)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfdel
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyvalue
- the value, must not benull
- Returns:
- a Uni producing
true
if the value was removed from the filter,false
otherwise (the value was not found in the filter)
-
cfexists
public io.smallrye.mutiny.Uni<Boolean> cfexists(K key, V value)
Description copied from interface:ReactiveCuckooCommands
Execute the command CF.EXISTS. Summary: Check if an item exists in a Cuckoo filter Group: cuckoo- Specified by:
cfexists
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyvalue
- the value, must not benull
- Returns:
- a Uni producing
true
if the value was found in the filter,false
otherwise.
-
cfinsert
public io.smallrye.mutiny.Uni<Void> cfinsert(K key, V... values)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfinsert
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyvalues
- the values, must not benull
, must not be empty, must not containnull
- Returns:
- a uni producing
null
when the operation completes
-
cfinsert
public io.smallrye.mutiny.Uni<Void> cfinsert(K key, CfInsertArgs args, V... values)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfinsert
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyargs
- the extra argumentsvalues
- the values, must not benull
, must not be empty, must not containnull
- Returns:
- a uni producing
null
when the operation completes
-
cfinsertnx
public io.smallrye.mutiny.Uni<List<Boolean>> cfinsertnx(K key, V... values)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfinsertnx
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyvalues
- the values, must not benull
, must not be empty, must not containnull
- Returns:
- a uni producing a list of boolean. For each added value, the corresponding boolean is
true
if the value has been added (non-existing) orfalse
if the value was already present in the filter.
-
cfinsertnx
public io.smallrye.mutiny.Uni<List<Boolean>> cfinsertnx(K key, CfInsertArgs args, V... values)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfinsertnx
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyargs
- the extra argumentsvalues
- the values, must not benull
, must not be empty, must not containnull
- Returns:
- a uni producing a list of boolean. For each added value, the corresponding boolean is
true
if the value has been added (non-existing) orfalse
if the value was already present in the filter.
-
cfmexists
public io.smallrye.mutiny.Uni<List<Boolean>> cfmexists(K key, V... values)
Description copied from interface:ReactiveCuckooCommands
Execute the command CF.MEXISTS. Summary: Check if an item exists in a Cuckoo filter Group: cuckoo- Specified by:
cfmexists
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keyvalues
- the values, must not benull
, must not containnull
, must not be empty- Returns:
- a uni producing a list of boolean indicating, for each corresponding value, if the value exists in the filter or not.
-
cfreserve
public io.smallrye.mutiny.Uni<Void> cfreserve(K key, long capacity)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfreserve
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keycapacity
- the capacity- Returns:
- a uni producing
null
when the operation completes
-
cfreserve
public io.smallrye.mutiny.Uni<Void> cfreserve(K key, long capacity, CfReserveArgs args)
Description copied from interface:ReactiveCuckooCommands
Execute 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:
cfreserve
in interfaceReactiveCuckooCommands<K,V>
- Parameters:
key
- the keycapacity
- the capacityargs
- the extra parameters- Returns:
- a uni producing
null
when the operation completes
-
-