Package com.helix.core.cache.l4
Class RedisLuaScripts
java.lang.Object
com.helix.core.cache.l4.RedisLuaScripts
Atomic Redis Lua scripts for concurrency-safe rule caching and stampede prevention.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
FETCH_OR_LOCK
Atomic fetch-or-lock pattern: KEYS[1]: rule bytecode key (e.g. "helix:rule:") ARGV[1]: lock TTL in milliseconds (e.g. "5000") Returns a 2-element table: - {1, bytecode} if cached entry is found - {2, "LOCKED"} if lock successfully acquired (caller must compile) - {3, "WAIT"} if lock is already held by another node (caller must wait) - See Also:
-
STORE_AND_NOTIFY
Stores compiled bytecode, sets expiration TTL, deletes the compilation lease lock, and publishes an update event on the cluster notification channel. KEYS[1]: rule bytecode key KEYS[2]: notification channel ARGV[1]: bytecode payload ARGV[2]: TTL in seconds- See Also:
-