+ add flushDB to RedisCommands + implementations
This commit is contained in:
@@ -50,4 +50,5 @@ public interface RedisCommands extends RedisTxCommands, RedisStringCommands, Red
|
||||
|
||||
void select(int dbIndex);
|
||||
|
||||
void flushDb();
|
||||
}
|
||||
@@ -120,6 +120,19 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void flushDb() {
|
||||
try {
|
||||
if (isQueueing()) {
|
||||
transaction.flushDB();
|
||||
}
|
||||
jedis.flushDB();
|
||||
} catch (Exception ex) {
|
||||
throw convertJedisAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer del(byte[]... keys) {
|
||||
try {
|
||||
|
||||
@@ -84,6 +84,15 @@ public class JredisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flushDb() {
|
||||
try {
|
||||
jredis.flushall();
|
||||
} catch (RedisException ex) {
|
||||
throw JredisUtils.convertJredisAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer del(byte[]... keys) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user