DATAKV-14

+ finish up the admin or server operations
This commit is contained in:
Costin Leau
2011-01-20 17:59:39 +02:00
parent ff639a0db5
commit 29ff50837f
3 changed files with 43 additions and 0 deletions

View File

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

View File

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

View File

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