Interface RedisScriptingCommands
- All Known Subinterfaces:
DefaultedRedisClusterConnection
,DefaultedRedisConnection
,RedisClusterConnection
,RedisCommands
,RedisConnection
,RedisConnectionUtils.RedisConnectionProxy
,StringRedisConnection
- All Known Implementing Classes:
AbstractRedisConnection
,DefaultStringRedisConnection
,JedisClusterConnection
,JedisConnection
,LettuceClusterConnection
,LettuceConnection
@NullUnmarked
public interface RedisScriptingCommands
Scripting commands.
- Author:
- Costin Leau, Christoph Strobl, David Liu, Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> T
eval
(byte @NonNull [] script, @NonNull ReturnType returnType, int numKeys, byte @NonNull [] @NonNull ... keysAndArgs) Evaluate givenscript
.<T> T
evalSha
(byte @NonNull [] scriptSha, @NonNull ReturnType returnType, int numKeys, byte @NonNull [] @NonNull ... keysAndArgs) Evaluate givenscriptSha
.<T> T
evalSha
(@NonNull String scriptSha, @NonNull ReturnType returnType, int numKeys, byte @NonNull [] @NonNull ... keysAndArgs) Evaluate givenscriptSha
.scriptExists
(@NonNull String @NonNull ... scriptShas) Check if givenscriptShas
exist in script cache.void
Flush lua script cache.void
Kill current lua script execution.scriptLoad
(byte @NonNull [] script) Load lua script into scripts cache, without executing it.
Execute the script by callingevalSha(byte[], ReturnType, int, byte[]...)
.
-
Method Details
-
scriptFlush
void scriptFlush()Flush lua script cache.- See Also:
-
scriptKill
void scriptKill()Kill current lua script execution.- See Also:
-
scriptLoad
Load lua script into scripts cache, without executing it.
Execute the script by callingevalSha(byte[], ReturnType, int, byte[]...)
.- Parameters:
script
- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
scriptExists
-
eval
<T> T eval(byte @NonNull [] script, @NonNull ReturnType returnType, int numKeys, byte @NonNull [] @NonNull ... keysAndArgs) Evaluate givenscript
.- Parameters:
script
- must not be null.returnType
- must not be null.numKeys
-keysAndArgs
- must not be null.- Returns:
- script result. null when used in pipeline / transaction.
- See Also:
-
evalSha
<T> T evalSha(@NonNull String scriptSha, @NonNull ReturnType returnType, int numKeys, byte @NonNull [] @NonNull ... keysAndArgs) Evaluate givenscriptSha
.- Parameters:
scriptSha
- must not be null.returnType
- must not be null.numKeys
-keysAndArgs
- must not be null.- Returns:
- script result. null when used in pipeline / transaction.
- See Also:
-
evalSha
<T> T evalSha(byte @NonNull [] scriptSha, @NonNull ReturnType returnType, int numKeys, byte @NonNull [] @NonNull ... keysAndArgs) Evaluate givenscriptSha
.- Parameters:
scriptSha
- must not be null.returnType
- must not be null.numKeys
-keysAndArgs
- must not be null.- Returns:
- script result. null when used in pipeline / transaction.
- Since:
- 1.5
- See Also:
-