+ update return signature for jedis exec

This commit is contained in:
Costin Leau
2011-03-15 22:11:57 +02:00
parent 689af37119
commit bb236634f0
4 changed files with 10 additions and 5 deletions

View File

@@ -116,7 +116,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
return delegate.echo(message);
}
public List<Object> exec() {
public List<byte[]> exec() {
return delegate.exec();
}

View File

@@ -27,7 +27,7 @@ public interface RedisTxCommands {
void multi();
List<Object> exec();
List<byte[]> exec();
void discard();

View File

@@ -511,14 +511,19 @@ public class JedisConnection implements RedisConnection {
}
}
@SuppressWarnings("unchecked")
@Override
public List<Object> exec() {
public List<byte[]> exec() {
try {
if (isPipelined()) {
pipeline.exec();
return null;
}
return transaction.exec();
List execute = transaction.exec();
if (execute != null && !execute.isEmpty()) {
return (List<byte[]>) execute;
}
return Collections.emptyList();
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}

View File

@@ -267,7 +267,7 @@ public class JredisConnection implements RedisConnection {
}
@Override
public List<Object> exec() {
public List<byte[]> exec() {
throw new UnsupportedOperationException();
}