Java Code Examples for redis.clients.jedis.Jedis#zrangeByScore()

The following examples show how to use redis.clients.jedis.Jedis#zrangeByScore() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RedisClient.java    From Mykit with Apache License 2.0 5 votes vote down vote up
public Set<String> getByRange(String key, double min, double max) {
	Jedis client = jedisPool.getResource();
	try {
		return client.zrangeByScore(key, min, max);
	} finally {
		// 向连接池“归还”资源
		jedisPool.returnResourceObject(client);
	}
}
 
Example 2
Source File: JedisClientPool.java    From paas with Apache License 2.0 5 votes vote down vote up
@Override
public Set<String> zrangeByScore(String key, double min, double max) {
    Jedis jedis = jedisPool.getResource();
    Set<String> result = jedis.zrangeByScore(key, min, max);
    jedis.close();
    return result;
}
 
Example 3
Source File: DefaultRedis.java    From craft-atom with MIT License 4 votes vote down vote up
private Set<String> zrangebyscore0(Jedis j, String key, double min, double max) {
	return j.zrangeByScore(key, min, max);
}
 
Example 4
Source File: DefaultRedis.java    From craft-atom with MIT License 4 votes vote down vote up
private Set<String> zrangebyscore_string(Jedis j, String key, String min, String max) {
	return j.zrangeByScore(key, min, max);
}
 
Example 5
Source File: DefaultRedis.java    From craft-atom with MIT License 4 votes vote down vote up
private Set<String> zrangebyscore_offset_count(Jedis j, String key, double min, double max, int offset, int count) {
	return j.zrangeByScore(key, min, max, offset, count);
}
 
Example 6
Source File: DefaultRedis.java    From craft-atom with MIT License 4 votes vote down vote up
private Set<String> zrangebyscore_offset_count_string(Jedis j, String key, String min, String max, int offset, int count) {
	return j.zrangeByScore(key, min, max, offset, count);
}
 
Example 7
Source File: JedisUtil.java    From BigData with GNU General Public License v3.0 3 votes vote down vote up
/**
 * 返回指定权重区间的元素集合
 * 
 * @param String
 *            key
 * @param double min 上限权重
 * @param double max 下限权重
 * @return Set<String>
 * */
public Set<String> zrangeByScore(String key, double min, double max) {
	// ShardedJedis sjedis = getShardedJedis();
	Jedis sjedis = getJedis();
	Set<String> set = sjedis.zrangeByScore(key, min, max);
	returnJedis(sjedis);
	return set;
}
 
Example 8
Source File: RedisClient.java    From springboot-learn with MIT License 2 votes vote down vote up
/**
 * 有序集合获取
 *
 * @param key
 * @param min
 * @param max
 * @return
 */
public Set<String> rangeByScore(String key, double min, double max) {
    Jedis jedis = jedisPool.getResource();
    return jedis.zrangeByScore(key, min, max);
}
 
Example 9
Source File: RedisClient.java    From springboot-learn with MIT License 2 votes vote down vote up
/**
 * 有序集合获取
 *
 * @param key
 * @param min
 * @param max
 * @return
 */
public Set<String> rangeByScore(String key, double min, double max) {
    Jedis jedis = jedisPool.getResource();
    return jedis.zrangeByScore(key, min, max);
}