本文整理了Java中redis.clients.jedis.JedisCluster.zcount()
方法的一些代码示例,展示了JedisCluster.zcount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCluster.zcount()
方法的具体详情如下:
包路径:redis.clients.jedis.JedisCluster
类名称:JedisCluster
方法名:zcount
暂无
代码示例来源:origin: spring-projects/spring-data-redis
@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);
}
}
代码示例来源:origin: spring-projects/spring-data-redis
@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);
}
}
代码示例来源:origin: hhfcyong/xxxx-dubbo
/**
* 返回有序集 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);
}
/**
代码示例来源:origin: net.oschina.j2cache/j2cache-core
@Override
public Long zcount(byte[] bytes, byte[] bytes1, byte[] bytes2) {
return cluster.zcount(bytes, bytes1, bytes2);
}
代码示例来源:origin: net.oschina.j2cache/j2cache-core
@Override
public Long zcount(byte[] bytes, double v, double v1) {
return cluster.zcount(bytes, v, v1);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long zcount(byte[] key, double min, double max) {
return jedisCluster.zcount(key, min, max);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long zcount(String key, double min, double max) {
return jedisCluster.zcount(key, min, max);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long zcount(String key, String min, String max) {
return jedisCluster.zcount(key, min, max);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long zcount(byte[] key, byte[] min, byte[] max) {
return jedisCluster.zcount(key, min, max);
}
代码示例来源:origin: yangfuhai/jboot
/**
* 返回有序集 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);
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public Long zcount(String key, double min, double max) {
return jedisCluster.zcount(SafeEncoder.encode(key), min, max);
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@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);
}
}
代码示例来源:origin: apache/servicemix-bundles
@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);
}
}
代码示例来源:origin: org.nanoframework/nano-orm-jedis
@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);
}
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public Long zcount(String key, String min, String max) {
return jedisCluster.zcount(SafeEncoder.encode(key), SafeEncoder.encode(min), SafeEncoder.encode(max));
}
代码示例来源:origin: org.nanoframework/nano-orm-jedis
@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);
}
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@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);
}
}
代码示例来源:origin: yrain/smart-cache
/**
* 返回有序集 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);
}
}
代码示例来源:origin: apache/servicemix-bundles
@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);
}
}
内容来源于网络,如有侵权,请联系作者删除!