Polishing.

Reformat code. Tweak Javadoc

See #1816.
Original pull request: #1968.
This commit is contained in:
Mark Paluch
2021-02-15 14:53:22 +01:00
parent 507a882e93
commit febdb82e58
6 changed files with 16 additions and 14 deletions

View File

@@ -475,8 +475,8 @@ class JedisClusterZSetCommands implements RedisZSetCommands {
}
try {
return toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max,
Long.valueOf(offset).intValue(), Long.valueOf(count).intValue()));
return toTupleSet(connection.getCluster().zrangeByScoreWithScores(key, min, max, Long.valueOf(offset).intValue(),
Long.valueOf(count).intValue()));
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}

View File

@@ -248,10 +248,8 @@ class JedisZSetCommands implements RedisZSetCommands {
.toSet(JedisConverters::toTuple);
}
return connection.invoke()
.fromMany(BinaryJedis::zrevrangeByScoreWithScores, MultiKeyPipelineBase::zrevrangeByScoreWithScores, key, max,
min)
.toSet(JedisConverters::toTuple);
return connection.invoke().fromMany(BinaryJedis::zrevrangeByScoreWithScores,
MultiKeyPipelineBase::zrevrangeByScoreWithScores, key, max, min).toSet(JedisConverters::toTuple);
}
/*
@@ -511,10 +509,8 @@ class JedisZSetCommands implements RedisZSetCommands {
}
String keyStr = new String(key, StandardCharsets.UTF_8);
return connection.invoke()
.fromMany(Jedis::zrangeByScore, MultiKeyPipelineBase::zrangeByScore, keyStr, min, max, (int) offset,
(int) count)
.toSet(JedisConverters::toBytes);
return connection.invoke().fromMany(Jedis::zrangeByScore, MultiKeyPipelineBase::zrangeByScore, keyStr, min, max,
(int) offset, (int) count).toSet(JedisConverters::toBytes);
}
/*
@@ -575,7 +571,6 @@ class JedisZSetCommands implements RedisZSetCommands {
byte[] min = JedisConverters.boundaryToBytesForZRangeByLex(range.getMin(), JedisConverters.MINUS_BYTES);
byte[] max = JedisConverters.boundaryToBytesForZRangeByLex(range.getMax(), JedisConverters.PLUS_BYTES);
if (!limit.isUnlimited()) {
return connection.invoke().from(BinaryJedis::zrevrangeByLex, MultiKeyPipelineBase::zrevrangeByLex, key, max, min,
limit.getOffset(), limit.getCount()).get(LinkedHashSet::new);