Package org.redisson
Class RedissonScript
java.lang.Object
org.redisson.RedissonScript
- All Implemented Interfaces:
RScript
,RScriptAsync
- Author:
- Nikita Koksharov
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.redisson.api.RScript
RScript.Mode, RScript.ReturnType
-
Constructor Summary
ConstructorDescriptionRedissonScript
(CommandAsyncExecutor commandExecutor) RedissonScript
(CommandAsyncExecutor commandExecutor, Codec codec) -
Method Summary
Modifier and TypeMethodDescription<R> R
eval
(String key, RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script<R> R
eval
(RScript.Mode mode, String luaScript, RScript.ReturnType returnType) Executes Lua script<R> R
eval
(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Executes Lua script<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, List<Object> keys, Object... values) Executes Lua script<R> 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> R
evalSha
(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType) Executes Lua script stored in Redis scripts cache by SHA-1 digest<R> 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<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
(String key, RScript.Mode mode, Codec codec, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) <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, 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.scriptExists
(String key, String... shaDigests) scriptExistsAsync
(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.void
Flushes Lua script cache.void
scriptFlush
(String key) Flushes Lua script cache.scriptFlushAsync
(String key) void
Kills currently executed Lua scriptvoid
scriptKill
(String key) Kills currently executed Lua scriptscriptKillAsync
(String key) scriptLoad
(String luaScript) Loads Lua script into Redis scripts cache and returns its SHA-1 digestscriptLoad
(String key, String luaScript) scriptLoadAsync
(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
-
Constructor Details
-
RedissonScript
-
RedissonScript
-
-
Method Details
-
scriptLoad
Description copied from interface:RScript
Loads Lua script into Redis scripts cache and returns its SHA-1 digest- Specified by:
scriptLoad
in interfaceRScript
- Parameters:
luaScript
- - lua script- Returns:
- SHA-1 digest
-
scriptLoad
-
scriptLoadAsync
Description copied from interface:RScriptAsync
Loads Lua script into Redis scripts cache and returns its SHA-1 digest- Specified by:
scriptLoadAsync
in interfaceRScriptAsync
- Parameters:
luaScript
- - lua script- Returns:
- SHA-1 digest
-
scriptLoadAsync
Description copied from interface:RScriptAsync
Loads Lua script into Redis scripts cache and returns its SHA-1 digest- Specified by:
scriptLoadAsync
in interfaceRScriptAsync
- Parameters:
key
- - used to locate Redis node in Cluster which stores cached Lua scriptluaScript
- - lua script- Returns:
- SHA-1 digest
-
eval
Description copied from interface:RScript
Executes Lua script -
eval
public <R> R eval(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScript
Executes Lua script- Specified by:
eval
in interfaceRScript
- 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
-
evalAsync
public <R> RFuture<R> evalAsync(RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScriptAsync
Executes Lua script- Specified by:
evalAsync
in interfaceRScriptAsync
- 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
-
evalSha
Description copied from interface:RScript
Executes Lua script stored in Redis scripts cache by SHA-1 digest -
evalSha
public <R> R evalSha(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScript
Executes Lua script stored in Redis scripts cache by SHA-1 digest- Specified by:
evalSha
in interfaceRScript
- 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
-
evalShaAsync
public <R> RFuture<R> evalShaAsync(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScriptAsync
Executes Lua script stored in Redis scripts cache by SHA-1 digest- Specified by:
evalShaAsync
in interfaceRScriptAsync
- 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
-
evalShaAsync
public <R> RFuture<R> evalShaAsync(String key, RScript.Mode mode, Codec codec, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) -
scriptKill
public void scriptKill()Description copied from interface:RScript
Kills currently executed Lua script- Specified by:
scriptKill
in interfaceRScript
-
scriptKill
-
scriptKillAsync
Description copied from interface:RScriptAsync
Kills currently executed Lua script- Specified by:
scriptKillAsync
in interfaceRScriptAsync
- Returns:
- void
-
scriptKillAsync
-
scriptExists
Description copied from interface:RScript
Checks for presence Lua scripts in Redis script cache by SHA-1 digest.- Specified by:
scriptExists
in interfaceRScript
- Parameters:
shaDigests
- - collection of SHA-1 digests- Returns:
- list of booleans corresponding to collection SHA-1 digests
-
scriptExistsAsync
Description copied from interface:RScriptAsync
Checks for presence Lua scripts in Redis script cache by SHA-1 digest.- Specified by:
scriptExistsAsync
in interfaceRScriptAsync
- Parameters:
shaDigests
- - collection of SHA-1 digests- Returns:
- list of booleans corresponding to collection SHA-1 digests
-
scriptExists
-
scriptExistsAsync
Description copied from interface:RScriptAsync
Checks for presence Lua scripts in Redis script cache by SHA-1 digest.- Specified by:
scriptExistsAsync
in interfaceRScriptAsync
- 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
-
scriptFlush
public void scriptFlush()Description copied from interface:RScript
Flushes Lua script cache.- Specified by:
scriptFlush
in interfaceRScript
-
scriptFlush
-
scriptFlushAsync
Description copied from interface:RScriptAsync
Flushes Lua script cache.- Specified by:
scriptFlushAsync
in interfaceRScriptAsync
- Returns:
- void
-
scriptFlushAsync
-
evalShaAsync
public <R> RFuture<R> evalShaAsync(RScript.Mode mode, String shaDigest, RScript.ReturnType returnType) Description copied from interface:RScriptAsync
Executes Lua script stored in Redis scripts cache by SHA-1 digest- Specified by:
evalShaAsync
in interfaceRScriptAsync
- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeshaDigest
- - SHA-1 digestreturnType
- - return type- Returns:
- result object
-
evalAsync
Description copied from interface:RScriptAsync
Executes Lua script- Specified by:
evalAsync
in interfaceRScriptAsync
- Type Parameters:
R
- - type of result- Parameters:
mode
- - execution modeluaScript
- - lua scriptreturnType
- - return type- Returns:
- result object
-
evalShaAsync
public <R> RFuture<R> evalShaAsync(String key, RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScriptAsync
Executes Lua script stored in Redis scripts cache by SHA-1 digest- Specified by:
evalShaAsync
in interfaceRScriptAsync
- 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
-
evalAsync
public <R> RFuture<R> evalAsync(String key, RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScriptAsync
Executes Lua script- Specified by:
evalAsync
in interfaceRScriptAsync
- 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
-
evalSha
public <R> R evalSha(String key, RScript.Mode mode, String shaDigest, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScript
Executes Lua script stored in Redis scripts cache by SHA-1 digest- Specified by:
evalSha
in interfaceRScript
- 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
-
eval
public <R> R eval(String key, RScript.Mode mode, String luaScript, RScript.ReturnType returnType, List<Object> keys, Object... values) Description copied from interface:RScript
Executes Lua script- Specified by:
eval
in interfaceRScript
- 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
-