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