Class SpringDataRedisScripts
java.lang.Object
me.ahoo.cosid.spring.autoconfigure.SpringDataRedisScripts
- All Implemented Interfaces:
me.ahoo.cosid.store.redis.RedisScripts
public final class SpringDataRedisScripts
extends Object
implements me.ahoo.cosid.store.redis.RedisScripts
RedisScripts on a Spring Data RedisConnectionFactory (D6), for a factory without a native Lettuce
client, such as a Jedis one; a LettuceConnectionFactory's own client is given to the store instead
(clientOf(org.springframework.data.redis.connection.RedisConnectionFactory, me.ahoo.cosid.runtime.StoreSpec)), which opens a connection of its own on it.
Each call takes a connection from the factory, runs the script on it (by digest, by text on NOSCRIPT) and,
with replicas to wait for, runs WAIT replicas timeout on that same connection: the store relies on it
(see RedisScripts). The option wait is auto (default: WAIT 1 when the server has
replicas), off or the replica count. On Redis Cluster the connection that ran the script is not reachable for
WAIT, so a cluster factory needs wait: off. The factory's own command timeout bounds each command;
the store timeout bounds WAIT.
-
Constructor Summary
ConstructorsConstructorDescriptionSpringDataRedisScripts(org.springframework.data.redis.connection.RedisConnectionFactory factory, Duration timeout, String wait) An adapter. -
Method Summary
-
Constructor Details
-
Method Details
-
eval
- Specified by:
evalin interfaceme.ahoo.cosid.store.redis.RedisScripts
-