예제 #1
0
 @Test
 public void zcount() {
   rc.del(a("myzset"));
   eq(1, rc.zadd(a("myzset", "1", "one")));
   eq(1, rc.zadd(a("myzset", "2", "two")));
   eq(1, rc.zadd(a("myzset", "3", "three")));
   eq(3, rc.zcount("myzset", "-inf", "inf"));
   eq(2, rc.zcount("myzset", "(1", "3"));
 }
 public Long zCount(byte[] key, double min, double max) {
   try {
     if (isPipelined()) {
       pipeline(pipeline.zcount(key, min, max));
       return null;
     }
     return client.zcount(key, min, max).data();
   } catch (Exception ex) {
     throw convertSrpAccessException(ex);
   }
 }