@Test public void zcard() { rc.del(a("myzset")); eq(1, rc.zadd(a("myzset", "1", "one"))); eq(1, rc.zadd(a("myzset", "2", "two"))); eq(2, rc.zcard("myzset")); }
public Long zCard(byte[] key) { try { if (isPipelined()) { pipeline(pipeline.zcard(key)); return null; } return client.zcard(key).data(); } catch (Exception ex) { throw convertSrpAccessException(ex); } }