Package org.nuxeo.ecm.core.redis
Interface RedisExecutor
-
- All Known Implementing Classes:
RedisAbstractExecutor,RedisFailoverExecutor,RedisPoolExecutor
public interface RedisExecutorExecute the jedis statement- Since:
- 6.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Objectevalsha(byte[] sha1, List<byte[]> keys, List<byte[]> args)Evaluates the script of the given SHA1 with the given keys and arguments.Objectevalsha(String sha1, List<String> keys, List<String> args)Evaluates the script of the given SHA1 with the given keys and arguments.<T> Texecute(RedisCallable<T> call)redis.clients.util.Pool<redis.clients.jedis.Jedis>getPool()default voidpsubscribe(redis.clients.jedis.JedisPubSub subscriber, String... patterns)Runs a subscriber to the given patterns.StringscriptLoad(String script)Loads the script into Redis.default voidstartMonitor()Start to trace Redis activity only for debug purpose.default voidstopMonitor()Stop tracing Redis activity.default voidsubscribe(redis.clients.jedis.JedisPubSub subscriber, String channel)Run a subscriber, do not return.
-
-
-
Method Detail
-
scriptLoad
String scriptLoad(String script) throws redis.clients.jedis.exceptions.JedisException
Loads the script into Redis.- Returns:
- the script SHA1
- Throws:
redis.clients.jedis.exceptions.JedisException- Since:
- 8.10
-
evalsha
Object evalsha(String sha1, List<String> keys, List<String> args) throws redis.clients.jedis.exceptions.JedisException
Evaluates the script of the given SHA1 with the given keys and arguments.Can reload the script if the Redis instance restarted and the script isn't available anymore.
- Parameters:
sha1- the script SHA1keys- the keysargs- the arguments- Returns:
- the SHA1
- Throws:
redis.clients.jedis.exceptions.JedisException- Since:
- 8.10
-
evalsha
Object evalsha(byte[] sha1, List<byte[]> keys, List<byte[]> args) throws redis.clients.jedis.exceptions.JedisException
Evaluates the script of the given SHA1 with the given keys and arguments.Can reload the script if the Redis instance restarted and the script isn't available anymore.
- Parameters:
sha1- the script SHA1keys- the keysargs- the arguments- Returns:
- the SHA1
- Throws:
redis.clients.jedis.exceptions.JedisException- Since:
- 8.10
-
execute
<T> T execute(RedisCallable<T> call) throws redis.clients.jedis.exceptions.JedisException
- Throws:
redis.clients.jedis.exceptions.JedisException
-
subscribe
default void subscribe(redis.clients.jedis.JedisPubSub subscriber, String channel) throws redis.clients.jedis.exceptions.JedisExceptionRun a subscriber, do not return.- Throws:
redis.clients.jedis.exceptions.JedisException
-
psubscribe
default void psubscribe(redis.clients.jedis.JedisPubSub subscriber, String... patterns) throws redis.clients.jedis.exceptions.JedisExceptionRuns a subscriber to the given patterns.- Parameters:
subscriber- the subscriberpatterns- the channel patterns- Throws:
redis.clients.jedis.exceptions.JedisException- Since:
- 9.1
-
getPool
redis.clients.util.Pool<redis.clients.jedis.Jedis> getPool()
-
startMonitor
default void startMonitor()
Start to trace Redis activity only for debug purpose.- Since:
- 8.1
-
stopMonitor
default void stopMonitor()
Stop tracing Redis activity.- Since:
- 8.1
-
-