Class ReactiveCountMinCommandsImpl<K,​V>

    • Method Detail

      • cmsIncrBy

        public io.smallrye.mutiny.Uni<Long> cmsIncrBy​(K key,
                                                      V value,
                                                      long increment)
        Description copied from interface: ReactiveCountMinCommands
        Execute 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:
        cmsIncrBy in interface ReactiveCountMinCommands<K,​V>
        Parameters:
        key - the name of the sketch, must not be null
        value - the value, must not be null
        increment - the increment
        Returns:
        a uni producing the updated min-count for the added value
      • cmsIncrBy

        public io.smallrye.mutiny.Uni<Map<V,​Long>> cmsIncrBy​(K key,
                                                                   Map<V,​Long> couples)
        Description copied from interface: ReactiveCountMinCommands
        Execute 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:
        cmsIncrBy in interface ReactiveCountMinCommands<K,​V>
        Parameters:
        key - the name of the sketch, must not be null
        couples - the set of value/increment pair, must not be null, must not be empty
        Returns:
        a uni producing a map containing the updated min-count for each added value
      • decodeAsMapVL

        Map<V,​Long> decodeAsMapVL​(Map<V,​Long> couples,
                                        io.vertx.mutiny.redis.client.Response r)
      • cmsInitByDim

        public io.smallrye.mutiny.Uni<Void> cmsInitByDim​(K key,
                                                         long width,
                                                         long depth)
        Description copied from interface: ReactiveCountMinCommands
        Execute the command CMS.INITBYDIM. Summary: Initializes a Count-Min Sketch to dimensions specified by user. Group: count-min

        Specified by:
        cmsInitByDim in interface ReactiveCountMinCommands<K,​V>
        Parameters:
        key - the name of the sketch, must not be null
        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 producing null when the operation completes
      • cmsInitByProb

        public io.smallrye.mutiny.Uni<Void> cmsInitByProb​(K key,
                                                          double error,
                                                          double probability)
        Description copied from interface: ReactiveCountMinCommands
        Execute the command CMS.INITBYPROB. Summary: Initializes a Count-Min Sketch to accommodate requested tolerances. Group: count-min

        Specified by:
        cmsInitByProb in interface ReactiveCountMinCommands<K,​V>
        Parameters:
        key - the name of the sketch, must not be null
        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 producing null when the operation completes
      • cmsQuery

        public io.smallrye.mutiny.Uni<Long> cmsQuery​(K key,
                                                     V item)
        Description copied from interface: ReactiveCountMinCommands
        Execute the command CMS.QUERY. Summary: Returns the count for one or more items in a sketch. Group: count-min

        Specified by:
        cmsQuery in interface ReactiveCountMinCommands<K,​V>
        Parameters:
        key - the name of the sketch, must not be null
        item - the item to check, must not be null
        Returns:
        a uni producing the count for the given item
      • cmsQuery

        public io.smallrye.mutiny.Uni<List<Long>> cmsQuery​(K key,
                                                           V... items)
        Description copied from interface: ReactiveCountMinCommands
        Execute the command CMS.QUERY. Summary: Returns the count for one or more items in a sketch. Group: count-min

        Specified by:
        cmsQuery in interface ReactiveCountMinCommands<K,​V>
        Parameters:
        key - the name of the sketch, must not be null
        items - the items to check, must not be null, empty or contain null
        Returns:
        a uni producing a list containing the count for the corresponding item
      • decodeAListOfLongs

        List<Long> decodeAListOfLongs​(io.vertx.mutiny.redis.client.Response r)
      • cmsMerge

        public io.smallrye.mutiny.Uni<Void> cmsMerge​(K dest,
                                                     List<K> src,
                                                     List<Integer> weight)
        Description copied from interface: ReactiveCountMinCommands
        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

        Specified by:
        cmsMerge in interface ReactiveCountMinCommands<K,​V>
        Parameters:
        dest - The name of destination sketch. Must be initialized, must not be null
        src - The names of source sketches to be merged. Must not be null, must not contain null, must not be empty.
        weight - The multiple of each sketch. Default =1, can be empty, can be null
        Returns:
        a uni producing null once the operation completes