public abstract class RedisAbstractExecutor extends Object implements RedisExecutor
RedisExecutor
.
This base implementation collects the loaded scripts to be able to re-load them if the server has been restarted and has lost them.
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
scripts |
NOOP
Constructor and Description |
---|
RedisAbstractExecutor() |
Modifier and Type | Method and Description |
---|---|
Object |
evalsha(byte[] sha1,
List<byte[]> keys,
List<byte[]> args)
Evaluates the script of the given SHA1 with the given keys and arguments.
|
Object |
evalsha(String sha1,
List<String> keys,
List<String> args)
Evaluates the script of the given SHA1 with the given keys and arguments.
|
String |
scriptLoad(String script)
Loads the script into Redis.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, getPool, psubscribe, startMonitor, stopMonitor, subscribe
public RedisAbstractExecutor()
public String scriptLoad(String script) throws redis.clients.jedis.exceptions.JedisException
RedisExecutor
scriptLoad
in interface RedisExecutor
redis.clients.jedis.exceptions.JedisException
public Object evalsha(String sha1, List<String> keys, List<String> args) throws redis.clients.jedis.exceptions.JedisException
RedisExecutor
Can reload the script if the Redis instance restarted and the script isn't available anymore.
evalsha
in interface RedisExecutor
sha1
- the script SHA1keys
- the keysargs
- the argumentsredis.clients.jedis.exceptions.JedisException
public Object evalsha(byte[] sha1, List<byte[]> keys, List<byte[]> args) throws redis.clients.jedis.exceptions.JedisException
RedisExecutor
Can reload the script if the Redis instance restarted and the script isn't available anymore.
evalsha
in interface RedisExecutor
sha1
- the script SHA1keys
- the keysargs
- the argumentsredis.clients.jedis.exceptions.JedisException
Copyright © 2017 Nuxeo. All rights reserved.