Interface ScriptExecutor<K>
- Type Parameters:
K
- The type of keys that may be passed during script execution
- All Known Implementing Classes:
DefaultScriptExecutor
public interface ScriptExecutor<K>
Executes
RedisScript
s- Author:
- Jennifer Hickey
-
Method Summary
Modifier and TypeMethodDescription<T> T
execute
(RedisScript<T> script, List<K> keys, Object... args) Executes the givenRedisScript
<T> T
execute
(RedisScript<T> script, RedisSerializer<?> argsSerializer, RedisSerializer<T> resultSerializer, List<K> keys, Object... args) Executes the givenRedisScript
, using the providedRedisSerializer
s to serialize the script arguments and result.
-
Method Details
-
execute
Executes the givenRedisScript
- Parameters:
script
- The script to executekeys
- Any keys that need to be passed to the scriptargs
- Any args that need to be passed to the script- Returns:
- The return value of the script or null if
RedisScript.getResultType()
is null, likely indicating a throw-away status reply (i.e. "OK")
-
execute
<T> T execute(RedisScript<T> script, RedisSerializer<?> argsSerializer, RedisSerializer<T> resultSerializer, List<K> keys, Object... args) Executes the givenRedisScript
, using the providedRedisSerializer
s to serialize the script arguments and result.- Parameters:
script
- The script to executeargsSerializer
- TheRedisSerializer
to use for serializing argsresultSerializer
- TheRedisSerializer
to use for serializing the script return valuekeys
- Any keys that need to be passed to the scriptargs
- Any args that need to be passed to the script- Returns:
- The return value of the script or null if
RedisScript.getResultType()
is null, likely indicating a throw-away status reply (i.e. "OK")
-