+ renamed some methods for consistency and clarity
This commit is contained in:
@@ -38,7 +38,7 @@ public interface RedisCommands extends RedisTxCommands, RedisStringCommands, Red
|
||||
|
||||
void rename(String oldName, String newName);
|
||||
|
||||
Boolean renameNx(String oldName, String newName);
|
||||
Boolean renameNX(String oldName, String newName);
|
||||
|
||||
Integer dbSize();
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@ import org.springframework.datastore.redis.UncategorizedRedisException;
|
||||
*
|
||||
* @author Costin Leau
|
||||
*/
|
||||
public interface RedisConnection extends RedisCommands, RedisHashCommands, RedisListCommands, RedisSetCommands,
|
||||
RedisStringCommands, RedisZSetCommands {
|
||||
public interface RedisConnection extends RedisCommands {
|
||||
|
||||
/**
|
||||
* Close (or quit) the connection.
|
||||
|
||||
@@ -241,7 +241,7 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean renameNx(String oldName, String newName) {
|
||||
public Boolean renameNX(String oldName, String newName) {
|
||||
try {
|
||||
if (isQueueing()) {
|
||||
transaction.renamenx(oldName, newName);
|
||||
|
||||
@@ -163,7 +163,7 @@ public class JredisConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean renameNx(String oldName, String newName) {
|
||||
public Boolean renameNX(String oldName, String newName) {
|
||||
try {
|
||||
return jredis.renamenx(oldName, newName);
|
||||
} catch (RedisException ex) {
|
||||
|
||||
@@ -62,13 +62,13 @@ class DefaultRedisSortedSet extends AbstractRedisCollection implements RedisSort
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedisSortedSet trim(int start, int end) {
|
||||
public RedisSortedSet remove(int start, int end) {
|
||||
commands.zRemRange(key, start, end);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedisSortedSet trimByScore(double min, double max) {
|
||||
public RedisSortedSet removeByScore(double min, double max) {
|
||||
commands.zRemRangeByScore(key, min, max);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface RedisSortedSet extends RedisStore, SortedSet<String> {
|
||||
|
||||
Set<String> rangeByScore(double min, double max);
|
||||
|
||||
RedisSortedSet trim(int start, int end);
|
||||
RedisSortedSet remove(int start, int end);
|
||||
|
||||
RedisSortedSet trimByScore(double min, double max);
|
||||
RedisSortedSet removeByScore(double min, double max);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user