Package org.redisson.api
Interface RScriptRx
public interface RScriptRx
RxJava2 interface for Redis Script feature
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescription<R> io.reactivex.rxjava3.core.Maybe<R>
eval
(String key, RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script<R> io.reactivex.rxjava3.core.Maybe<R>
eval
(RScript.Mode mode, String luaScript, RScript.ReturnType returnType) Executes Lua script<R> io.reactivex.rxjava3.core.Maybe<R>
eval
(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script<R> io.reactivex.rxjava3.core.Maybe<R>
evalSha
(String key, RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script stored in Redis scripts cache by SHA-1 digest<R> io.reactivex.rxjava3.core.Maybe<R>
evalSha
(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType) Executes Lua script stored in Redis scripts cache by SHA-1 digest<R> io.reactivex.rxjava3.core.Maybe<R>
evalSha
(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script stored in Redis scripts cache by SHA-1 digestscriptExists
(String... shaDigests) Checks for presence Lua scripts in Redis script cache by SHA-1 digest.io.reactivex.rxjava3.core.Completable
Flushes Lua script cache.io.reactivex.rxjava3.core.Completable
Kills currently executed Lua scriptio.reactivex.rxjava3.core.Single<String>
scriptLoad
(String luaScript) Loads Lua script into Redis scripts cache and returns its SHA-1 digest
-
Method Details
-
scriptFlush
io.reactivex.rxjava3.core.Completable scriptFlush()Flushes Lua script cache.- Returns:
- void
-
evalSha
<R> io.reactivex.rxjava3.core.Maybe<R> evalSha(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script stored in Redis scripts cache by SHA-1 digest- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeshaDigest
- - SHA-1 digestreturnType
- - return typekeys
- - keys available through KEYS param in scriptvalues
- - values available through VALUES param in script- Returns:
- result object
-
evalSha
<R> io.reactivex.rxjava3.core.Maybe<R> evalSha(String key, RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script stored in Redis scripts cache by SHA-1 digest- Type Parameters:
R
- - type of result- Parameters:
key
- - used to locate Redis node in Cluster which stores cached Lua scriptmode
- - execution modeshaDigest
- - SHA-1 digestreturnType
- - return typekeys
- - keys available through KEYS param in scriptvalues
- - values available through VALUES param in script- Returns:
- result object
-
evalSha
<R> io.reactivex.rxjava3.core.Maybe<R> evalSha(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType) Executes Lua script stored in Redis scripts cache by SHA-1 digest- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeshaDigest
- - SHA-1 digestreturnType
- - return type- Returns:
- result object
-
eval
<R> io.reactivex.rxjava3.core.Maybe<R> eval(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeluaScript
- - lua scriptreturnType
- - return typekeys
- - keys available through KEYS param in scriptvalues
- - values available through VALUES param in script- Returns:
- result object
-
eval
<R> io.reactivex.rxjava3.core.Maybe<R> eval(RScript.Mode mode, String luaScript, RScript.ReturnType returnType) Executes Lua script- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeluaScript
- - lua scriptreturnType
- - return type- Returns:
- result object
-
eval
<R> io.reactivex.rxjava3.core.Maybe<R> eval(String key, RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script- Type Parameters:
R
- - type of result- Parameters:
key
- - used to locate Redis node in Cluster which stores cached Lua scriptmode
- - execution modeluaScript
- - lua scriptreturnType
- - return typekeys
- - keys available through KEYS param in scriptvalues
- - values available through VALUES param in script- Returns:
- result object
-
scriptLoad
Loads Lua script into Redis scripts cache and returns its SHA-1 digest- Parameters:
luaScript
- - lua script- Returns:
- SHA-1 digest
-
scriptExists
Checks for presence Lua scripts in Redis script cache by SHA-1 digest.- Parameters:
shaDigests
- - collection of SHA-1 digests- Returns:
- list of booleans corresponding to collection SHA-1 digests
-
scriptKill
io.reactivex.rxjava3.core.Completable scriptKill()Kills currently executed Lua script- Returns:
- void
-