public class RedisScriptingMethods
extends io.toro.martini.redis.RedisBaseMethods
Constructor and Description |
---|
RedisScriptingMethods(DataSourceManager dataSourceManager) |
Modifier and Type | Method and Description |
---|---|
static String |
digest(String connectionName,
Object script,
io.toro.gloop.engine.GloopExecutionContext context)
Create a SHA1 digest from a Lua script.
|
static String |
digestAsync(String connectionName,
Object script,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously create a SHA1 digest from a lua script.
|
static Object |
eval(String connectionName,
String script,
String type,
io.toro.gloop.engine.GloopExecutionContext context,
Object... keys)
Execute a Lua script server side.
|
static Object |
eval(String connectionName,
String script,
String type,
Object[] keys,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Execute a Lua script server side.
|
static Future<Object> |
evalAsync(String connectionName,
String script,
String type,
io.toro.gloop.engine.GloopExecutionContext context,
Object... keys)
Asynchronously execute a lua script server side.
|
static Future<Object> |
evalAsync(String connectionName,
String script,
String type,
Object[] keys,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Asynchronously execute a lua script server side.
|
static Object |
evalsha(String connectionName,
String digest,
String type,
io.toro.gloop.engine.GloopExecutionContext context,
Object... keys)
Evaluates a script cached on the server side by its SHA1 digest
|
static Object |
evalsha(String connectionName,
String digest,
String type,
Object[] keys,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Execute a Lua script server side.
|
static Future<Object> |
evalshaAsync(String connectionName,
String digest,
String type,
io.toro.gloop.engine.GloopExecutionContext context,
Object... keys)
Asynchronously evaluates a script cached on the server side by its sHA1 digest
|
static <T> Future<T> |
evalshaAsync(String connectionName,
String digest,
String type,
Object[] keys,
io.toro.gloop.engine.GloopExecutionContext context,
Object... values)
Asynchronously execute a lua script server side.
|
static List<Boolean> |
scriptExists(String connectionName,
io.toro.gloop.engine.GloopExecutionContext context,
String... digests)
Check existence of scripts in the script cache.
|
static Future<List<Boolean>> |
scriptExistsAsync(String connectionName,
io.toro.gloop.engine.GloopExecutionContext context,
String... digests)
Asynchronously check existence of scripts in the script cache.
|
static String |
scriptFlush(String connectionName,
io.toro.gloop.engine.GloopExecutionContext context)
Remove all the scripts from the script cache.
|
static Future<String> |
scriptFlushAsync(String connectionName,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously remove all the scripts from the script cache.
|
static String |
scriptKill(String connectionName,
io.toro.gloop.engine.GloopExecutionContext context)
Kill the script currently in execution.
|
static Future<String> |
scriptKillAsync(String connectionName,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously kill the script currently in execution.
|
static String |
scriptLoad(String connectionName,
Object script,
io.toro.gloop.engine.GloopExecutionContext context)
Load the specified Lua script into the script cache.
|
static Future<String> |
scriptLoadAsync(String connectionName,
Object script,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronously load the specified lua script into the script cache.
|
@Autowired RedisScriptingMethods(DataSourceManager dataSourceManager)
@GloopParameter(name="redisEvalOutput") public static Object eval(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String script, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool namescript
- Lua 5.1 script.type
- output typekeys
- key names@GloopParameter(name="redisEvalOutput") public static Object eval(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String script, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, @GloopParameter(allowNull=false) Object[] keys, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namescript
- Lua 5.1 script.type
- the typekeys
- the keysvalues
- the values@GloopParameter(name="redisFutureEvalOutput") public static Future<Object> evalAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String script, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool namescript
- lua 5.1 script.type
- output typekeys
- key names@GloopParameter(name="redisFutureEvalOutput") public static Future<Object> evalAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String script, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, @GloopParameter(allowNull=false) Object[] keys, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namescript
- lua 5.1 script.type
- the typekeys
- the keysvalues
- the values@GloopParameter(name="redisEvalshaOutput") public static Object evalsha(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String digest, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool namedigest
- SHA1 of the scripttype
- the typekeys
- the keys@GloopParameter(name="redisEvalshaOutput") public static Object evalsha(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String digest, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, @GloopParameter(allowNull=false) Object[] keys, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namedigest
- SHA1 of the scripttype
- the typekeys
- the keysvalues
- the values@GloopParameter(name="redisFutureEvalshaOutput") public static Future<Object> evalshaAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String digest, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keys)
connectionName
- The Martini Runtime Redis connection pool namedigest
- sHA1 of the scripttype
- the typekeys
- the keys@GloopParameter(name="redisFutureEvalshaOutput") public static <T> Future<T> evalshaAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) String digest, @GloopParameter(allowNull=false,choices={"BOOLEAN","INTEGER","MULTI","STATUS","VALUE"}) String type, @GloopParameter(allowNull=false) Object[] keys, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) Object... values)
connectionName
- The Martini Runtime Redis connection pool namedigest
- sHA1 of the scripttype
- the typekeys
- the keysvalues
- the values@GloopParameter(name="redisScriptExistsOutput") public static List<Boolean> scriptExists(@GloopParameter(allowNull=false) String connectionName, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) String... digests)
connectionName
- The Martini Runtime Redis connection pool namedigests
- script digests@GloopParameter(name="redisFutureScriptExistsOutput") public static Future<List<Boolean>> scriptExistsAsync(@GloopParameter(allowNull=false) String connectionName, io.toro.gloop.engine.GloopExecutionContext context, @GloopParameter(allowNull=false) String... digests)
connectionName
- The Martini Runtime Redis connection pool namedigests
- script digests@GloopParameter(name="redisScriptFlushOutput") public static String scriptFlush(@GloopParameter(allowNull=false) String connectionName, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool name@GloopParameter(name="redisFutureScriptFlushOutput") public static Future<String> scriptFlushAsync(@GloopParameter(allowNull=false) String connectionName, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool name@GloopParameter(name="redisScriptKillOutput") public static String scriptKill(@GloopParameter(allowNull=false) String connectionName, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool name@GloopParameter(name="redisFutureScriptKillOutput") public static Future<String> scriptKillAsync(@GloopParameter(allowNull=false) String connectionName, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool name@GloopParameter(name="redisScriptLoadOutput") public static String scriptLoad(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object script, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namescript
- script content@GloopParameter(name="redisFutureScriptLoadOutput") public static Future<String> scriptLoadAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object script, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namescript
- script content@GloopParameter(name="redisDigestOutput") public static String digest(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object script, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namescript
- script content@GloopParameter(name="redisFutureDigestOutput") public static String digestAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object script, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namescript
- script contentCopyright © 2020. All rights reserved.