Package io.lettuce.core.api.sync
Interface RedisFunctionCommands<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Known Subinterfaces:
RedisAdvancedClusterCommands<K,V>
,RedisClusterCommands<K,V>
,RedisClusterPubSubCommands<K,V>
,RedisCommands<K,V>
,RedisPubSubCommands<K,V>
public interface RedisFunctionCommands<K,V>
Synchronous executed commands for Redis Functions.Function code
is encoded by using the configuredcharset
.- Since:
- 6.3
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateSyncApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
fcall(String function, ScriptOutputType type, K... keys)
Invoke a function.<T> T
fcall(String function, ScriptOutputType type, K[] keys, V... values)
Invoke a function.<T> T
fcallReadOnly(String function, ScriptOutputType type, K... keys)
Invoke a function in read-only mode.<T> T
fcallReadOnly(String function, ScriptOutputType type, K[] keys, V... values)
Invoke a function in read-only mode.byte[]
functionDump()
Return the serialized payload of loaded libraries.String
functionFlush(FlushMode flushMode)
Deletes all the libraries using the specifiedFlushMode
.String
functionKill()
Kill a function that is currently executing.List<Map<String,Object>>
functionList()
Return information about the functions and libraries.List<Map<String,Object>>
functionList(String libraryName)
Return information about the functions and libraries.String
functionLoad(String functionCode)
Load a library to Redis.String
functionLoad(String functionCode, boolean replace)
Load a library to Redis.String
functionRestore(byte[] dump)
You can restore the dumped payload of loaded libraries.String
functionRestore(byte[] dump, FunctionRestoreMode mode)
You can restore the dumped payload of loaded libraries.
-
-
-
Method Detail
-
fcall
<T> T fcall(String function, ScriptOutputType type, K... keys)
Invoke a function.- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- key names.- Returns:
- function result.
-
fcall
<T> T fcall(String function, ScriptOutputType type, K[] keys, V... values)
Invoke a function.- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- the keys.values
- the values (arguments).- Returns:
- function result.
-
fcallReadOnly
<T> T fcallReadOnly(String function, ScriptOutputType type, K... keys)
Invoke a function in read-only mode.- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- key names.- Returns:
- function result.
-
fcallReadOnly
<T> T fcallReadOnly(String function, ScriptOutputType type, K[] keys, V... values)
Invoke a function in read-only mode.- Type Parameters:
T
- expected return type.- Parameters:
function
- the function name.type
- output type.keys
- the keys.values
- the values (arguments).- Returns:
- function result.
-
functionLoad
String functionLoad(String functionCode)
Load a library to Redis.- Parameters:
functionCode
- code of the function.- Returns:
- name of the library.
-
functionLoad
String functionLoad(String functionCode, boolean replace)
Load a library to Redis.- Parameters:
functionCode
- code of the function.replace
- whether to replace an existing function.- Returns:
- name of the library.
-
functionDump
byte[] functionDump()
Return the serialized payload of loaded libraries. You can restore the dump throughfunctionRestore(byte[])
.- Returns:
- the serialized payload.
-
functionRestore
String functionRestore(byte[] dump)
You can restore the dumped payload of loaded libraries.- Returns:
- Simple string reply
-
functionRestore
String functionRestore(byte[] dump, FunctionRestoreMode mode)
You can restore the dumped payload of loaded libraries.- Returns:
- Simple string reply
-
functionFlush
String functionFlush(FlushMode flushMode)
Deletes all the libraries using the specifiedFlushMode
.- Parameters:
flushMode
- the flush mode (sync/async).- Returns:
- String simple-string-reply.
-
functionKill
String functionKill()
Kill a function that is currently executing.- Returns:
- String simple-string-reply.
-
functionList
List<Map<String,Object>> functionList()
Return information about the functions and libraries.- Returns:
- Array reply.
-
-