本文整理了Java中redis.clients.jedis.Jedis.zremrangeByRank()
方法的一些代码示例,展示了Jedis.zremrangeByRank()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.zremrangeByRank()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:zremrangeByRank
[英]Remove all elements in the sorted set at key with rank between start and end. Start and end are 0-based with rank 0 being the element with the lowest score. Both start and end can be negative numbers, where they indicate offsets starting at the element with the highest rank. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth.
Time complexity: O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation
[中]移除排序集中排名介于开始和结束之间的所有元素。开始和结束是基于0的,排名0是得分最低的元素。起点和终点都可以是负数,它们表示从具有最高秩的元素开始的偏移量。例如:-1是得分最高的元素,-2是得分第二高的元素,依此类推。
时间复杂度:O(log(N))+O(M),其中N是排序集中的元素数,M是操作移除的元素数
代码示例来源:origin: sohutv/cachecloud
@Override
public Long execute(Jedis connection) {
return connection.zremrangeByRank(key, start, end);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Long execute(Jedis connection) {
return connection.zremrangeByRank(key, start, end);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Long zremrangeByRank(byte[] key, long start, long end) {
Jedis j = getShard(key);
return j.zremrangeByRank(key, start, end);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Long zremrangeByRank(String key, long start, long end) {
Jedis j = getShard(key);
return j.zremrangeByRank(key, start, end);
}
代码示例来源:origin: Netflix/conductor
@Override
public Long zremrangeByRank(String key, long start, long end) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.zremrangeByRank(key, start, end);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Long zRemRange(byte[] key, long start, long end) {
Assert.notNull(key, "Key must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newJedisResult(connection.getRequiredPipeline().zremrangeByRank(key, start, end)));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().zremrangeByRank(key, start, end)));
return null;
}
return connection.getJedis().zremrangeByRank(key, start, end);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long execute(Jedis connection) {
return connection.zremrangeByRank(key, start, stop);
}
}.runBinary(key);
代码示例来源:origin: tangyanbo/springmore
@Override
public Long action(Jedis jedis) {
return jedis.zremrangeByRank(key, start, end);
}
});
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.zremrangeByRank(key, start, end);
}
});
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Long zremrangeByRank(String key, long start, long end) {
return jedis.zremrangeByRank(key, start, end);
}
代码示例来源:origin: yrain/smart-cache
@Override
Long doInJedis(Jedis jedis) {
return jedis.zremrangeByRank(key, start, end);
}
});
代码示例来源:origin: yrain/smart-cache
@Override
Long doInJedis(Jedis jedis) {
return jedis.zremrangeByRank(key, start, end);
}
});
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long execute(Jedis connection) {
return connection.zremrangeByRank(key, start, stop);
}
}.run(key);
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Long zremrangeByRank(String key, long start, long end) {
return jedis.zremrangeByRank(key, start, end);
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Long zremrangeByRank(String key, long start, long end) {
String command = "zremrangeByRank";
return instrumented(command, () -> delegated.zremrangeByRank(key, start, end));
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long zremrangeByRank(final String key, final long start, final long stop) {
Jedis j = getShard(key);
return j.zremrangeByRank(key, start, stop);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long zremrangeByRank(final byte[] key, final long start, final long stop) {
Jedis j = getShard(key);
return j.zremrangeByRank(key, start, stop);
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Long zremrangeByRank(byte[] key, long start, long end) {
String command = "zremrangeByRank";
return instrumented(command, () -> delegated.zremrangeByRank(key, start, end));
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
public Long execute(final Jedis conn) throws Exception {
return conn.zremrangeByRank(SafeEncoder.encode(key), start, end);
}
});
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public Long zremrangeByRank(String key, long start, long end) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.zremrangeByRank(key, start, end);
} finally {
if (jedis != null)
jedis.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!