public interface FunctionCommands
| Modifier and Type | Method and Description |
|---|---|
Object |
fcall(String name,
List<String> keys,
List<String> args)
Invoke a function.
|
Object |
fcallReadonly(String name,
List<String> keys,
List<String> args)
This is a read-only variant of the
FCALL
command that cannot execute commands that modify data. |
String |
functionDelete(String libraryName)
This command deletes the library called library-name and all functions in it.
|
byte[] |
functionDump()
Return the serialized payload of loaded libraries.
|
String |
functionFlush()
Deletes all the libraries, unless called with the optional mode argument, the
'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.
|
String |
functionFlush(FlushMode mode)
Deletes all the libraries, unless called with the optional mode argument, the
'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.
|
String |
functionKill()
Kill a function that is currently executing.
|
List<LibraryInfo> |
functionList()
Return information about the functions and libraries.
|
List<LibraryInfo> |
functionList(String libraryNamePattern)
Return information about the functions and libraries.
|
List<LibraryInfo> |
functionListWithCode()
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
List<LibraryInfo> |
functionListWithCode(String libraryNamePattern)
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
String |
functionLoad(String functionCode)
Load a library to Redis.
|
String |
functionLoadReplace(String functionCode)
Load a library to Redis.
|
String |
functionRestore(byte[] serializedValue)
Restore libraries from the serialized payload.
|
String |
functionRestore(byte[] serializedValue,
FunctionRestorePolicy policy)
Restore libraries from the serialized payload.
|
FunctionStats |
functionStats()
Return information about the function that's currently running and information
about the available execution engines.
|
Object fcall(String name, List<String> keys, List<String> args)
name - keys - args - Object fcallReadonly(String name, List<String> keys, List<String> args)
FCALL
command that cannot execute commands that modify data.String functionDelete(String libraryName)
libraryName - byte[] functionDump()
FUNCTION RESTORE command.String functionFlush()
String functionFlush(FlushMode mode)
mode - ASYNC: Asynchronously flush the libraries, SYNC: Synchronously flush the libraries.String functionKill()
List<LibraryInfo> functionList()
LibraryInfoList<LibraryInfo> functionList(String libraryNamePattern)
libraryNamePattern - a pattern for matching library namesLibraryInfoList<LibraryInfo> functionListWithCode()
FUNCTION LIST but include the
libraries source implementation in the reply.LibraryInfofunctionList()List<LibraryInfo> functionListWithCode(String libraryNamePattern)
FUNCTION LIST but include the
libraries source implementation in the reply.libraryNamePattern - a pattern for matching library namesLibraryInfofunctionList(String)String functionLoad(String functionCode)
The library payload must start with Shebang statement that provides a metadata about the
library (like the engine to use and the library name). Shebang format:
#!<engine name> name=<library name>. Currently engine name must be lua.
functionCode - the source code.String functionLoadReplace(String functionCode)
functionCode - the source codeString functionRestore(byte[] serializedValue)
serializedValue - the serialized payloadString functionRestore(byte[] serializedValue, FunctionRestorePolicy policy)
serializedValue - the serialized payloadpolicy - can be FLUSH, APPEND or REPLACEFunctionStats functionStats()
FunctionStatsCopyright © 2024. All rights reserved.