Add Redis 2.6 info(section) method to Connections
DATAREDIS-183
This commit is contained in:
@@ -236,6 +236,10 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
|
||||
return delegate.info();
|
||||
}
|
||||
|
||||
public Properties info(String section) {
|
||||
return delegate.info(section);
|
||||
}
|
||||
|
||||
public boolean isClosed() {
|
||||
return delegate.isClosed();
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public interface RedisServerCommands {
|
||||
|
||||
Properties info();
|
||||
|
||||
Properties info(String section);
|
||||
|
||||
void shutdown();
|
||||
|
||||
List<String> getConfig(String pattern);
|
||||
|
||||
@@ -476,6 +476,11 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
|
||||
public Properties info(String section) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
public Long lastSave() {
|
||||
try {
|
||||
if (isQueueing()) {
|
||||
|
||||
@@ -276,6 +276,11 @@ public class JredisConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
|
||||
public Properties info(String section) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
public Long lastSave() {
|
||||
try {
|
||||
return (Long)jredis.lastsave();
|
||||
|
||||
@@ -406,6 +406,19 @@ public class LettuceConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
|
||||
public Properties info(String section) {
|
||||
try {
|
||||
if (isPipelined()) {
|
||||
pipeline(getAsyncConnection().info(section));
|
||||
return null;
|
||||
}
|
||||
return LettuceUtils.info(getConnection().info(section));
|
||||
} catch (Exception ex) {
|
||||
throw convertLettuceAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Long lastSave() {
|
||||
try {
|
||||
if (isPipelined()) {
|
||||
|
||||
@@ -322,6 +322,19 @@ public class SrpConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
|
||||
public Properties info(String section) {
|
||||
try {
|
||||
if (isPipelined()) {
|
||||
pipeline(pipeline.info(section));
|
||||
return null;
|
||||
}
|
||||
return SrpUtils.info(client.info(section));
|
||||
} catch (Exception ex) {
|
||||
throw convertSrpAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Long lastSave() {
|
||||
try {
|
||||
if (isPipelined()) {
|
||||
|
||||
Reference in New Issue
Block a user