本文整理了Java中redis.clients.jedis.Jedis.zrevrange()
方法的一些代码示例,展示了Jedis.zrevrange()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.zrevrange()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:zrevrange
暂无
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<byte[]> execute(Jedis connection) {
return connection.zrevrange(key, start, end);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<String> execute(Jedis connection) {
return connection.zrevrange(key, start, end);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
public Set<byte[]> execute(Jedis connection) {
return connection.zrevrange(keyByte, start, end);
}
}.runBinary(keyByte);
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<String> zrevrange(String key, long start, long end) {
Jedis j = getShard(key);
return j.zrevrange(key, start, end);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<byte[]> zrevrange(byte[] key, long start, long end) {
Jedis j = getShard(key);
return j.zrevrange(key, start, end);
}
代码示例来源:origin: Netflix/conductor
@Override
public Set<String> zrevrange(String key, long start, long end) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.zrevrange(key, start, end);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: code4craft/webmagic
private String getRequest(Jedis jedis, Task task)
{
String url;
Set<String> urls = jedis.zrevrange(getZsetPlusPriorityKey(task), 0, 0);
if(urls.isEmpty())
{
url = jedis.lpop(getQueueNoPriorityKey(task));
if(StringUtils.isBlank(url))
{
urls = jedis.zrevrange(getZsetMinusPriorityKey(task), 0, 0);
if(!urls.isEmpty())
{
url = urls.toArray(new String[0])[0];
jedis.zrem(getZsetMinusPriorityKey(task), url);
}
}
}
else
{
url = urls.toArray(new String[0])[0];
jedis.zrem(getZsetPlusPriorityKey(task), url);
}
return url;
}
代码示例来源:origin: jfinal/jfinal
/**
* 返回有序集 key 中,指定区间内的成员。
* 其中成员的位置按 score 值递减(从大到小)来排列。
* 具有相同 score 值的成员按字典序的逆序(reverse lexicographical order)排列。
* 除了成员按 score 值递减的次序排列这一点外, ZREVRANGE 命令的其他方面和 ZRANGE 命令一样。
*/
@SuppressWarnings("rawtypes")
public Set zrevrange(Object key, long start, long end) {
Jedis jedis = getJedis();
try {
Set<byte[]> data = jedis.zrevrange(keyToBytes(key), start, end);
Set<Object> result = new LinkedHashSet<Object>(); // 有序集合必须 LinkedHashSet
valueSetFromBytesSet(data, result);
return result;
}
finally {close(jedis);}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Set<byte[]> zRevRange(byte[] key, long start, long end) {
Assert.notNull(key, "Key must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newJedisResult(connection.getRequiredPipeline().zrevrange(key, start, end)));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().zrevrange(key, start, end)));
return null;
}
return connection.getJedis().zrevrange(key, start, end);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: jwpttcg66/NettyGameServer
/**
* 排序
* @param key
*/
public Set<String> zRevRange(String key, long start, long end){
Jedis jedis = null;
boolean success = true;
Set<String> set = null;
try {
jedis = jedisPool.getResource();
set = jedis.zrevrange(key, start, end);
} catch (Exception e) {
success = false;
releasBrokenReidsSource(jedis, key, "deleteKey", e, false);
} finally {
releaseReidsSource(success, jedis);
}
return set;
}
代码示例来源:origin: tangyanbo/springmore
@Override
public Set<String> action(Jedis jedis) {
return jedis.zrevrange(key, start, end);
}
});
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.zrevrange(key, start, end);
}
});
代码示例来源:origin: apache/servicemix-bundles
@Override
public Set<byte[]> execute(Jedis connection) {
return connection.zrevrange(key, start, stop);
}
}.runBinary(key);
代码示例来源:origin: yrain/smart-cache
@Override
Set<String> doInJedis(Jedis jedis) {
return jedis.zrevrange(key, start, end);
}
});
代码示例来源:origin: yrain/smart-cache
@Override
Set<byte[]> doInJedis(Jedis jedis) {
return jedis.zrevrange(key, start, end);
}
});
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Set<String> zrevrange(String key, long start, long end) {
String command = "zrevrange";
return instrumented(command, () -> delegated.zrevrange(key, start, end));
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Set<byte[]> zrevrange(byte[] key, long start, long end) {
String command = "zrevrange";
return instrumented(command, () -> delegated.zrevrange(key, start, end));
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Set<String> zrevrange(String key, long start, long end) {
Jedis jedis = getJedis();
try {
return jedis.zrevrange(key, start, end);
} finally {Streams.safeClose(jedis);}
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Set<byte[]> zrevrange(byte[] key, long start, long end) {
Jedis jedis = getJedis();
try {
return jedis.zrevrange(key, start, end);
} finally {Streams.safeClose(jedis);}
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public Set<String> zrevrange(String key, long start, long end) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.zrevrange(key, start, end);
} finally {
if (jedis != null)
jedis.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!