Eval and Evalsha is now supported

Conflicts:

	src/main/java/redis/clients/jedis/Client.java
	src/main/java/redis/clients/jedis/Jedis.java
This commit is contained in:
Ivo Ramirez
2011-12-15 15:51:45 +01:00
committed by ivowiblo
parent be163acd52
commit 9dc89626ac
9 changed files with 207 additions and 4 deletions

View File

@@ -3006,4 +3006,26 @@ public class BinaryJedis implements BinaryJedisCommands {
public Long getDB() {
return client.getDB();
}
/**
* Evaluates scripts using the Lua interpreter built into Redis starting from version 2.6.0.
* <p>
*
* @return Script result
*/
public Object eval(byte[] script, List<byte[]> keys, List<byte[]> args) {
client.setTimeoutInfinite();
client.eval(script, keys, args);
return client.getOne();
}
/**
* Evaluates scripts using the Lua interpreter built into Redis starting from version 2.6.0.
* <p>
*
* @return Script result
*/
public Object eval(byte[] script, List<byte[]> keys) {
return eval(script,keys, new ArrayList<byte[]>());
}
}