Package org.redisson.api
Interface RScript
-
- All Superinterfaces:
RScriptAsync
- All Known Implementing Classes:
RedissonScript
public interface RScript extends RScriptAsync
Interface for Redis Script feature- Author:
- Nikita Koksharov
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RScript.Mode
static class
RScript.ReturnType
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <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> 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 digestList<Boolean>
scriptExists(String... shaDigests)
Checks for presence Lua scripts in Redis script cache by SHA-1 digest.void
scriptFlush()
Flushes Lua script cache.void
scriptKill()
Kills currently executed Lua scriptString
scriptLoad(String luaScript)
Loads Lua script into Redis scripts cache and returns its SHA-1 digest-
Methods inherited from interface org.redisson.api.RScriptAsync
evalAsync, evalAsync, evalAsync, evalShaAsync, evalShaAsync, evalShaAsync, scriptExistsAsync, scriptExistsAsync, scriptFlushAsync, scriptKillAsync, scriptLoadAsync, scriptLoadAsync
-
-
-
-
Method Detail
-
evalSha
<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- 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> 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> 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> 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
-
eval
<R> 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> 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
-
scriptLoad
String scriptLoad(String luaScript)
Loads Lua script into Redis scripts cache and returns its SHA-1 digest- Parameters:
luaScript
- - lua script- Returns:
- SHA-1 digest
-
scriptExists
List<Boolean> scriptExists(String... shaDigests)
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
void scriptKill()
Kills currently executed Lua script
-
scriptFlush
void scriptFlush()
Flushes Lua script cache.
-
-