DATAKV-14
+ finish up the admin or server operations
This commit is contained in:
@@ -31,6 +31,8 @@ public interface RedisServerCommands {
|
||||
|
||||
Long lastSave();
|
||||
|
||||
void save();
|
||||
|
||||
Long dbSize();
|
||||
|
||||
void flushDb();
|
||||
@@ -44,4 +46,6 @@ public interface RedisServerCommands {
|
||||
List<String> getConfig(String pattern);
|
||||
|
||||
void setConfig(String param, String value);
|
||||
|
||||
void resetConfigStats();
|
||||
}
|
||||
|
||||
@@ -250,6 +250,18 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
try {
|
||||
if (isQueueing()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
jedis.save();
|
||||
} catch (Exception ex) {
|
||||
throw convertJedisAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getConfig(String param) {
|
||||
try {
|
||||
@@ -298,6 +310,19 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resetConfigStats() {
|
||||
try {
|
||||
if (isQueueing()) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
jedis.configResetStat();
|
||||
} catch (Exception ex) {
|
||||
throw convertJedisAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
try {
|
||||
|
||||
@@ -177,6 +177,15 @@ public class JredisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
try {
|
||||
jredis.save();
|
||||
} catch (RedisException ex) {
|
||||
throw JredisUtils.convertJredisAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getConfig(String pattern) {
|
||||
throw new UnsupportedOperationException();
|
||||
@@ -205,6 +214,11 @@ public class JredisConnection implements RedisConnection {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetConfigStats() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
Reference in New Issue
Block a user