Package org.redisson.api
Interface RScriptAsync
- All Known Subinterfaces:
RScript
- All Known Implementing Classes:
RedissonScript
public interface RScriptAsync
Async interface for Redis Script feature
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescription<R> RFuture
<R> evalAsync
(String key, RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script<R> RFuture
<R> evalAsync
(RScript.Mode mode, String luaScript, RScript.ReturnType returnType) Executes Lua script<R> RFuture
<R> evalAsync
(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, Function<Collection<R>, R> resultMapper, Object... values) Executes a Lua script.<R> RFuture
<R> evalAsync
(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script<R> RFuture
<R> evalShaAsync
(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> RFuture
<R> evalShaAsync
(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType) Executes Lua script stored in Redis scripts cache by SHA-1 digest<R> RFuture
<R> evalShaAsync
(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, Function<Collection<R>, R> resultMapper, Object... values) Executes a Lua script stored in Redis scripts cache by SHA-1 digestshaDigest
.<R> RFuture
<R> evalShaAsync
(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script stored in Redis scripts cache by SHA-1 digestscriptExistsAsync
(String... shaDigests) Checks for presence Lua scripts in Redis script cache by SHA-1 digest.scriptExistsAsync
(String key, String... shaDigests) Checks for presence Lua scripts in Redis script cache by SHA-1 digest.Flushes Lua script cache.Kills currently executed Lua scriptscriptLoadAsync
(String luaScript) Loads Lua script into Redis scripts cache and returns its SHA-1 digestscriptLoadAsync
(String key, String luaScript) Loads Lua script into Redis scripts cache and returns its SHA-1 digest
-
Method Details
-
scriptFlushAsync
Flushes Lua script cache.- Returns:
- void
-
evalShaAsync
<R> RFuture<R> evalShaAsync(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 ARGV param in script- Returns:
- result object
-
evalShaAsync
<R> RFuture<R> evalShaAsync(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, Function<Collection<R>, R> resultMapper, Object... values) Executes a Lua script stored in Redis scripts cache by SHA-1 digestshaDigest
. The script is executed over all Redis master or slave nodes in cluster depending onmode
value.resultMapper
function reduces all results from Redis nodes into one.- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeshaDigest
- - SHA-1 digestreturnType
- - return typeresultMapper
- - function for reducing multiple results into onevalues
- - values available through ARGV param in script- Returns:
- result object
-
evalShaAsync
<R> RFuture<R> evalShaAsync(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 ARGV param in script- Returns:
- result object
-
evalShaAsync
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
-
evalAsync
<R> RFuture<R> evalAsync(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 ARGV param in script- Returns:
- result object
-
evalAsync
<R> RFuture<R> evalAsync(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, Function<Collection<R>, R> resultMapper, Object... values) Executes a Lua script. The script is executed over all Redis master or slave nodes in cluster depending onmode
value.resultMapper
function reduces all results from Redis nodes into one.- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeluaScript
- - lua scriptreturnType
- - return typeresultMapper
- - function for reducing multiple results into onevalues
- - values available through ARGV param in script- Returns:
- result object
-
evalAsync
<R> RFuture<R> evalAsync(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 ARGV param in script- Returns:
- result object
-
evalAsync
Executes Lua script- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeluaScript
- - lua scriptreturnType
- - return type- Returns:
- result object
-
scriptLoadAsync
Loads Lua script into Redis scripts cache and returns its SHA-1 digest- Parameters:
luaScript
- - lua script- Returns:
- SHA-1 digest
-
scriptLoadAsync
Loads Lua script into Redis scripts cache and returns its SHA-1 digest- Parameters:
key
- - used to locate Redis node in Cluster which stores cached Lua scriptluaScript
- - lua script- Returns:
- SHA-1 digest
-
scriptExistsAsync
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
-
scriptExistsAsync
Checks for presence Lua scripts in Redis script cache by SHA-1 digest.- Parameters:
key
- - used to locate Redis node in Cluster which stores cached Lua scriptshaDigests
- - collection of SHA-1 digests- Returns:
- list of booleans corresponding to collection SHA-1 digests
-
scriptKillAsync
Kills currently executed Lua script- Returns:
- void
-