Binary scripting API is tested
This commit is contained in:
@@ -3037,9 +3037,9 @@ public class BinaryJedis implements BinaryJedisCommands {
|
||||
return client.getBinaryBulkReply();
|
||||
}
|
||||
|
||||
public List<byte[]> scriptExists(byte[]... sha1){
|
||||
public List<Long> scriptExists(byte[]... sha1){
|
||||
client.scriptExists(sha1);
|
||||
return client.getBinaryMultiBulkReply();
|
||||
return client.getIntegerMultiBulkReply();
|
||||
}
|
||||
|
||||
public byte[] scriptLoad(byte[] script){
|
||||
|
||||
@@ -205,6 +205,13 @@ public class Connection {
|
||||
pipelinedCommands--;
|
||||
return (List<Object>) protocol.read(inputStream);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Long> getIntegerMultiBulkReply() {
|
||||
flush();
|
||||
pipelinedCommands--;
|
||||
return (List<Long>) protocol.read(inputStream);
|
||||
}
|
||||
|
||||
public List<Object> getAll() {
|
||||
return getAll(0);
|
||||
|
||||
@@ -2749,11 +2749,11 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
|
||||
public List<Boolean> scriptExists(String... sha1){
|
||||
client.scriptExists(sha1);
|
||||
List<Object> result = client.getObjectMultiBulkReply();
|
||||
List<Long> result = client.getIntegerMultiBulkReply();
|
||||
List<Boolean> exists = new ArrayList<Boolean>();
|
||||
|
||||
for(Object value : result)
|
||||
exists.add(((Long)value) == 1);
|
||||
for(Long value : result)
|
||||
exists.add(value == 1);
|
||||
|
||||
return exists;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user