+ fix return signature for closePipeline method
This commit is contained in:
@@ -1119,7 +1119,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Object> closePipeline() {
|
public List<byte[]> closePipeline() {
|
||||||
return delegate.closePipeline();
|
return delegate.closePipeline();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,5 +95,5 @@ public interface RedisConnection extends RedisCommands {
|
|||||||
*
|
*
|
||||||
* @return the result of the executed commands.
|
* @return the result of the executed commands.
|
||||||
*/
|
*/
|
||||||
List<Object> closePipeline();
|
List<byte[]> closePipeline();
|
||||||
}
|
}
|
||||||
@@ -186,10 +186,14 @@ public class JedisConnection implements RedisConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public List<Object> closePipeline() {
|
public List<byte[]> closePipeline() {
|
||||||
if (pipeline != null) {
|
if (pipeline != null) {
|
||||||
return pipeline.execute();
|
List execute = pipeline.execute();
|
||||||
|
if (execute != null && !execute.isEmpty()) {
|
||||||
|
return (List<byte[]>) execute;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
@@ -217,7 +221,7 @@ public class JedisConnection implements RedisConnection {
|
|||||||
else {
|
else {
|
||||||
pipeline.sort(key);
|
pipeline.sort(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (sortParams != null ? jedis.sort(key, sortParams) : jedis.sort(key));
|
return (sortParams != null ? jedis.sort(key, sortParams) : jedis.sort(key));
|
||||||
@@ -741,7 +745,8 @@ public class JedisConnection implements RedisConnection {
|
|||||||
for (byte[] key : keys) {
|
for (byte[] key : keys) {
|
||||||
if (isPipelined()) {
|
if (isPipelined()) {
|
||||||
pipeline.watch(key);
|
pipeline.watch(key);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
jedis.watch(key);
|
jedis.watch(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1096,11 +1101,11 @@ public class JedisConnection implements RedisConnection {
|
|||||||
if (isPipelined()) {
|
if (isPipelined()) {
|
||||||
final List<byte[]> args = new ArrayList<byte[]>();
|
final List<byte[]> args = new ArrayList<byte[]>();
|
||||||
for (final byte[] arg : keys) {
|
for (final byte[] arg : keys) {
|
||||||
args.add(arg);
|
args.add(arg);
|
||||||
}
|
}
|
||||||
args.add(Protocol.toByteArray(timeout));
|
args.add(Protocol.toByteArray(timeout));
|
||||||
pipeline.blpop(args.toArray(new byte[args.size()][]));
|
pipeline.blpop(args.toArray(new byte[args.size()][]));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return jedis.blpop(timeout, keys);
|
return jedis.blpop(timeout, keys);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
@@ -1117,11 +1122,11 @@ public class JedisConnection implements RedisConnection {
|
|||||||
if (isPipelined()) {
|
if (isPipelined()) {
|
||||||
final List<byte[]> args = new ArrayList<byte[]>();
|
final List<byte[]> args = new ArrayList<byte[]>();
|
||||||
for (final byte[] arg : keys) {
|
for (final byte[] arg : keys) {
|
||||||
args.add(arg);
|
args.add(arg);
|
||||||
}
|
}
|
||||||
args.add(Protocol.toByteArray(timeout));
|
args.add(Protocol.toByteArray(timeout));
|
||||||
pipeline.brpop(args.toArray(new byte[args.size()][]));
|
pipeline.brpop(args.toArray(new byte[args.size()][]));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return jedis.brpop(timeout, keys);
|
return jedis.brpop(timeout, keys);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class JredisConnection implements RedisConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Object> closePipeline() {
|
public List<byte[]> closePipeline() {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user