Class ZIncrByParams


  • public class ZIncrByParams
    extends Params
    Parameters for ZINCRBY commands

    In fact, Redis doesn't have parameters for ZINCRBY. Instead Redis has INCR parameter for ZADD.
    When users call ZADD with INCR option, its restriction (only one member) and return type is same to ZINCRBY.
    Document page for ZADD also describes INCR option to act like ZINCRBY.
    http://redis.io/commands/zadd

    So we decided to wrap "ZADD with INCR option" to ZINCRBY.
    https://github.com/xetorthio/jedis/issues/1067

    Works with Redis 3.0.2 and onwards.
    • Constructor Detail

      • ZIncrByParams

        public ZIncrByParams()
    • Method Detail

      • nx

        public ZIncrByParams nx()
        Only set the key if it does not already exist.
        Returns:
        ZIncrByParams
      • xx

        public ZIncrByParams xx()
        Only set the key if it already exist.
        Returns:
        ZIncrByParams
      • getByteParams

        public byte[][] getByteParams​(byte[] key,
                                      byte[]... args)