Ejemplo n.º 1
0
 @Test
 public void zincrby() {
   rc.del(a("myzset"));
   eq(1, rc.zadd(a("myzset", "1", "one")));
   eq(1, rc.zadd(a("myzset", "2", "two")));
   eq("3", rc.zincrby("myzset", "2", "one"));
   eq(a("two", "2", "one", "3"), rc.zrange("myzset", "0", "-1", WITHSCORES));
 }
 public Double zIncrBy(byte[] key, double increment, byte[] value) {
   try {
     if (isPipelined()) {
       pipeline(pipeline.zincrby(key, increment, value));
       return null;
     }
     return SrpUtils.toDouble(client.zincrby(key, increment, value).data());
   } catch (Exception ex) {
     throw convertSrpAccessException(ex);
   }
 }