Class ReactiveCountMinCommandsImpl<K,V>
java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommands
io.quarkus.redis.runtime.datasource.AbstractCountMinCommands<K,V>
io.quarkus.redis.runtime.datasource.ReactiveCountMinCommandsImpl<K,V>
- All Implemented Interfaces:
ReactiveCountMinCommands<K,,V> ReactiveRedisCommands
public class ReactiveCountMinCommandsImpl<K,V>
extends AbstractCountMinCommands<K,V>
implements ReactiveCountMinCommands<K,V>, ReactiveRedisCommands
-
Field Summary
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
marshaller, redis -
Constructor Summary
ConstructorsConstructorDescriptionReactiveCountMinCommandsImpl(ReactiveRedisDataSourceImpl redis, Type k, Type v) -
Method Summary
Modifier and TypeMethodDescriptionExecute the command CMS.INCRBY.io.smallrye.mutiny.Uni<Long>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>Execute the command CMS.MERGE.io.smallrye.mutiny.Uni<Long>Execute the command CMS.QUERY.Execute the command CMS.QUERY.decodeAListOfLongs(io.vertx.mutiny.redis.client.Response r) decodeAsMapVL(Map<V, Long> couples, io.vertx.mutiny.redis.client.Response r) Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractCountMinCommands
_cmsIncrBy, _cmsIncrBy, _cmsInitByDim, _cmsInitByProb, _cmsMerge, _cmsQuery, _cmsQueryMethods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
execute, isMap
-
Constructor Details
-
ReactiveCountMinCommandsImpl
-
-
Method Details
-
getDataSource
- Specified by:
getDataSourcein interfaceReactiveRedisCommands- Returns:
- the data source.
-
cmsIncrBy
Description copied from interface:ReactiveCountMinCommandsExecute the command CMS.INCRBY. Summary: Increases the count of item by increment. Multiple items can be increased with one call. Group: count-min- Specified by:
cmsIncrByin interfaceReactiveCountMinCommands<K,V> - Parameters:
key- the name of the sketch, must not benullvalue- the value, must not benullincrement- the increment- Returns:
- a uni producing the updated min-count for the added value
-
cmsIncrBy
Description copied from interface:ReactiveCountMinCommandsExecute the command CMS.INCRBY. Summary: Increases the count of item by increment. Multiple items can be increased with one call. Group: count-min- Specified by:
cmsIncrByin interfaceReactiveCountMinCommands<K,V> - Parameters:
key- the name of the sketch, must not benullcouples- the set of value/increment pair, must not benull, must not be empty- Returns:
- a uni producing a map containing the updated min-count for each added value
-
decodeAsMapVL
-
cmsInitByDim
Description copied from interface:ReactiveCountMinCommandsExecute the command CMS.INITBYDIM. Summary: Initializes a Count-Min Sketch to dimensions specified by user. Group: count-min- Specified by:
cmsInitByDimin interfaceReactiveCountMinCommands<K,V> - Parameters:
key- the name of the sketch, must not benullwidth- 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 producing
nullwhen the operation completes
-
cmsInitByProb
Description copied from interface:ReactiveCountMinCommandsExecute the command CMS.INITBYPROB. Summary: Initializes a Count-Min Sketch to accommodate requested tolerances. Group: count-min- Specified by:
cmsInitByProbin interfaceReactiveCountMinCommands<K,V> - Parameters:
key- the name of the sketch, must not benullerror- 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 producing
nullwhen the operation completes
-
cmsQuery
Description copied from interface:ReactiveCountMinCommandsExecute the command CMS.QUERY. Summary: Returns the count for one or more items in a sketch. Group: count-min- Specified by:
cmsQueryin interfaceReactiveCountMinCommands<K,V> - Parameters:
key- the name of the sketch, must not benullitem- the item to check, must not benull- Returns:
- a uni producing the count for the given item
-
cmsQuery
Description copied from interface:ReactiveCountMinCommandsExecute the command CMS.QUERY. Summary: Returns the count for one or more items in a sketch. Group: count-min- Specified by:
cmsQueryin interfaceReactiveCountMinCommands<K,V> - Parameters:
key- the name of the sketch, must not benullitems- the items to check, must not benull, empty or containnull- Returns:
- a uni producing a list containing the count for the corresponding item
-
decodeAListOfLongs
-
cmsMerge
Description copied from interface:ReactiveCountMinCommandsExecute 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- Specified by:
cmsMergein interfaceReactiveCountMinCommands<K,V> - Parameters:
dest- The name of destination sketch. Must be initialized, must not benullsrc- 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 producing
nullonce the operation completes
-