Interface ReactiveTransactionalCountMinCommands<K,V>
-
- Type Parameters:
K
- the type of the keyV
- the type of the value stored in the sketch
- All Superinterfaces:
ReactiveTransactionalRedisCommands
- All Known Implementing Classes:
ReactiveTransactionalCountMinCommandsImpl
public interface ReactiveTransactionalCountMinCommands<K,V> extends ReactiveTransactionalRedisCommands
Allows executing commands from thecount-min
group. These commands require the Redis Bloom module (this modules also include Count-Min Sketches) to be installed in the Redis server.See the count-min command list for further information about these commands.
This API is intended to be used in a Redis transaction (
MULTI
), thus, all command methods returnUni<Void>
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>
cmsIncrBy(K key, Map<V,Long> couples)
Execute the command CMS.INCRBY.io.smallrye.mutiny.Uni<Void>
cmsIncrBy(K key, V value, long increment)
Execute the command CMS.INCRBY.io.smallrye.mutiny.Uni<Void>
cmsInitByDim(K key, long width, long depth)
Execute the command CMS.INITBYDIM.io.smallrye.mutiny.Uni<Void>
cmsInitByProb(K key, double error, double probability)
Execute the command CMS.INITBYPROB.io.smallrye.mutiny.Uni<Void>
cmsMerge(K dest, List<K> src, List<Integer> weight)
Execute the command CMS.MERGE.io.smallrye.mutiny.Uni<Void>
cmsQuery(K key, V item)
Execute the command CMS.QUERY.io.smallrye.mutiny.Uni<Void>
cmsQuery(K key, V... items)
Execute the command CMS.QUERY.-
Methods inherited from interface io.quarkus.redis.datasource.ReactiveTransactionalRedisCommands
getDataSource
-
-
-
-
Method Detail
-
cmsIncrBy
io.smallrye.mutiny.Uni<Void> cmsIncrBy(K key, V value, long increment)
Execute the command CMS.INCRBY. Summary: Increases the count of item by increment. Multiple items can be increased with one call. Group: count-min- Parameters:
key
- the name of the sketch, must not benull
value
- the value, must not benull
increment
- the increment- Returns:
- A
Uni
emittingnull
when the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
cmsIncrBy
io.smallrye.mutiny.Uni<Void> cmsIncrBy(K key, Map<V,Long> couples)
Execute the command CMS.INCRBY. Summary: Increases the count of item by increment. Multiple items can be increased with one call. Group: count-min- Parameters:
key
- the name of the sketch, must not benull
couples
- the set of value/increment pair, must not benull
, must not be empty- Returns:
- A
Uni
emittingnull
when the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
cmsInitByDim
io.smallrye.mutiny.Uni<Void> cmsInitByDim(K key, long width, long depth)
Execute the command CMS.INITBYDIM. Summary: Initializes a Count-Min Sketch to dimensions specified by user. Group: count-min- Parameters:
key
- the name of the sketch, must not benull
width
- the number of counters in each array. Reduces the error size.depth
- the number of counter-arrays. Reduces the probability for an error of a certain size (percentage of total count).- Returns:
- A
Uni
emittingnull
when the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
cmsInitByProb
io.smallrye.mutiny.Uni<Void> cmsInitByProb(K key, double error, double probability)
Execute the command CMS.INITBYPROB. Summary: Initializes a Count-Min Sketch to accommodate requested tolerances. Group: count-min- Parameters:
key
- the name of the sketch, must not benull
error
- estimate size of error. The error is a percent of total counted items (in decimal). This effects the width of the sketch.probability
- the desired probability for inflated count. This should be a decimal value between 0 and 1.- Returns:
- A
Uni
emittingnull
when the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
cmsQuery
io.smallrye.mutiny.Uni<Void> cmsQuery(K key, V item)
Execute the command CMS.QUERY. Summary: Returns the count for one or more items in a sketch. Group: count-min- Parameters:
key
- the name of the sketch, must not benull
item
- the item to check, must not benull
- Returns:
- A
Uni
emittingnull
when the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
cmsQuery
io.smallrye.mutiny.Uni<Void> cmsQuery(K key, V... items)
Execute the command CMS.QUERY. Summary: Returns the count for one or more items in a sketch. Group: count-min- Parameters:
key
- the name of the sketch, must not benull
items
- the items to check, must not benull
, empty or containnull
- Returns:
- A
Uni
emittingnull
when the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
cmsMerge
io.smallrye.mutiny.Uni<Void> cmsMerge(K dest, List<K> src, List<Integer> weight)
Execute the command CMS.MERGE. Summary: Merges several sketches into one sketch. All sketches must have identical width and depth. Weights can be used to multiply certain sketches. Default weight is 1. Group: count-min- Parameters:
dest
- The name of destination sketch. Must be initialized, must not benull
src
- The names of source sketches to be merged. Must not benull
, must not containnull
, must not be empty.weight
- The multiple of each sketch. Default =1, can be empty, can benull
- Returns:
- A
Uni
emittingnull
when the command has been enqueued successfully in the transaction, a failure otherwise. In the case of failure, the transaction is discarded.
-
-