+ renamed some methods for consistency and clarity

This commit is contained in:
Costin Leau
2010-11-09 19:00:42 +02:00
parent 9c75ae2d94
commit 1770462ae2
6 changed files with 8 additions and 9 deletions

View File

@@ -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();

View File

@@ -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.

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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);
}