@Override public Long zCount(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return connection.getCluster().zcount(key, min, max); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long zCount(byte[] key, Range range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range cannot be null for ZCOUNT."); byte[] min = JedisConverters.boundaryToBytesForZRange(range.getMin(), JedisConverters.NEGATIVE_INFINITY_BYTES); byte[] max = JedisConverters.boundaryToBytesForZRange(range.getMax(), JedisConverters.POSITIVE_INFINITY_BYTES); try { return connection.getCluster().zcount(key, min, max); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
/** * 返回有序集 key 中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量 * @param key * @param min * @param max * @return score 值在 min 和 max 之间的成员的数量 */ public long zcount(String key,double min,double max){ return jedisCluster.zcount(key, min, max); } /**
@Override public Long zcount(byte[] bytes, byte[] bytes1, byte[] bytes2) { return cluster.zcount(bytes, bytes1, bytes2); }
@Override public Long zcount(byte[] bytes, double v, double v1) { return cluster.zcount(bytes, v, v1); }
public Long zcount(byte[] key, double min, double max) { return jedisCluster.zcount(key, min, max); }
public Long zcount(String key, double min, double max) { return jedisCluster.zcount(key, min, max); }
public Long zcount(String key, String min, String max) { return jedisCluster.zcount(key, min, max); }
public Long zcount(byte[] key, byte[] min, byte[] max) { return jedisCluster.zcount(key, min, max); }
/** * 返回有序集 key 中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量。 * 关于参数 min 和 max 的详细使用方法,请参考 ZRANGEBYSCORE 命令。 */ public Long zcount(Object key, double min, double max) { return jedisCluster.zcount(keyToBytes(key), min, max); }
@Override public Long zcount(String key, double min, double max) { return jedisCluster.zcount(SafeEncoder.encode(key), min, max); }
@Override public Long zCount(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return connection.getCluster().zcount(key, min, max); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long zCount(byte[] key, double min, double max) { Assert.notNull(key, "Key must not be null!"); try { return connection.getCluster().zcount(key, min, max); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public long zcount(final String key, final double min, final double max) { Assert.hasText(key); try { return cluster.zcount(key, min, max); } catch (final Throwable e) { throw new RedisClientException(e.getMessage(), e); } }
@Override public Long zcount(String key, String min, String max) { return jedisCluster.zcount(SafeEncoder.encode(key), SafeEncoder.encode(min), SafeEncoder.encode(max)); }
@Override public long zcount(final String key, final String min, final String max) { Assert.hasText(key); Assert.hasText(min); Assert.hasText(max); try { return cluster.zcount(key, min, max); } catch (final Throwable e) { throw new RedisClientException(e.getMessage(), e); } }
@Override public Long zCount(byte[] key, Range range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range cannot be null for ZCOUNT."); byte[] min = JedisConverters.boundaryToBytesForZRange(range.getMin(), JedisConverters.NEGATIVE_INFINITY_BYTES); byte[] max = JedisConverters.boundaryToBytesForZRange(range.getMax(), JedisConverters.POSITIVE_INFINITY_BYTES); try { return connection.getCluster().zcount(key, min, max); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
/** * 返回有序集 key 中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量。 * 返回值: * score 值在 min 和 max 之间的成员的数量。 */ public Long zcount(Object key, double min, double max) { if (null == key) { return null; } if (cluster) { return jedisCluster.zcount(serializeKey(key), min, max); } else { return jedisOperator.zcount(serializeKey(key), min, max); } }
@Override public Long zCount(byte[] key, Range range) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(range, "Range cannot be null for ZCOUNT."); byte[] min = JedisConverters.boundaryToBytesForZRange(range.getMin(), JedisConverters.NEGATIVE_INFINITY_BYTES); byte[] max = JedisConverters.boundaryToBytesForZRange(range.getMax(), JedisConverters.POSITIVE_INFINITY_BYTES); try { return connection.getCluster().zcount(key, min, max); } catch (Exception ex) { throw convertJedisAccessException(ex); } }