Class ZAddCommandKt

    • Constructor Detail

    • Method Detail

      • zaddCommand

         final static RedisRequest zaddCommand(String key, Collection<Pair<StreamWithLength, Double>> members, ZAddCondition condition, ZAddComparison comparison, Boolean ch, Function1<Long, Unit> onResult)
        Parameters:
        members -
        • the members with their scores

        condition -
        • optional, only add new or only update existing members

        comparison -
        • optional, only update existing members if the new score is greater/less than the current one

        ch -
        • if true, the result also counts members whose score was updated

        onResult -
        • called with the number of added members (plus updated members if ch is true)

      • zaddIncrCommand

         final static RedisRequest zaddIncrCommand(String key, StreamWithLength member, Double increment, ZAddCondition condition, ZAddComparison comparison, Function1<Double, Unit> onResult)

        ZADD with the INCR option: increments the score of member like ZINCRBY.

        Parameters:
        condition -
        • optional, only add new or only update existing members

        comparison -
        • optional, only update an existing member if the new score is greater/less than the current one

        onResult -
        • called with the new score of member, or null if the operation was aborted because of condition or comparison