@Test public void zrank() { 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(2, (IntegerReply) rc.zrank("myzset", "three")); eq(null, (BulkReply) rc.zrank("myzset", "four")); }
public Long zRank(byte[] key, byte[] value) { try { if (isPipelined()) { pipeline(pipeline.zrank(key, value)); return null; } return (Long) client.zrank(key, value).data(); } catch (Exception ex) { throw convertSrpAccessException(ex); } }