public interface FunctionCommands
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
fcall(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
Invoke a function.
|
java.lang.Object |
fcallReadonly(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
This is a read-only variant of the
FCALL
command that cannot execute commands that modify data. |
java.lang.String |
functionDelete(java.lang.String libraryName)
This command deletes the library called library-name and all functions in it.
|
byte[] |
functionDump()
Return the serialized payload of loaded libraries.
|
java.lang.String |
functionFlush()
Deletes all the libraries, unless called with the optional mode argument, the
'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.
|
java.lang.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.
|
java.lang.String |
functionKill()
Kill a function that is currently executing.
|
java.util.List<LibraryInfo> |
functionList()
Return information about the functions and libraries.
|
java.util.List<LibraryInfo> |
functionList(java.lang.String libraryNamePattern)
Return information about the functions and libraries.
|
java.util.List<LibraryInfo> |
functionListWithCode()
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
java.util.List<LibraryInfo> |
functionListWithCode(java.lang.String libraryNamePattern)
Similar to
FUNCTION LIST but include the
libraries source implementation in the reply. |
java.lang.String |
functionLoad(java.lang.String functionCode)
Load a library to Redis.
|
java.lang.String |
functionLoadReplace(java.lang.String functionCode)
Load a library to Redis.
|
java.lang.String |
functionRestore(byte[] serializedValue)
Restore libraries from the serialized payload.
|
java.lang.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.
|
java.lang.Object fcall(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
name - keys - args - java.lang.Object fcallReadonly(java.lang.String name,
java.util.List<java.lang.String> keys,
java.util.List<java.lang.String> args)
FCALL
command that cannot execute commands that modify data.java.lang.String functionDelete(java.lang.String libraryName)
libraryName - byte[] functionDump()
FUNCTION RESTORE command.java.lang.String functionFlush()
java.lang.String functionFlush(FlushMode mode)
mode - ASYNC: Asynchronously flush the libraries, SYNC: Synchronously flush the libraries.java.lang.String functionKill()
java.util.List<LibraryInfo> functionList()
LibraryInfojava.util.List<LibraryInfo> functionList(java.lang.String libraryNamePattern)
libraryNamePattern - a pattern for matching library namesLibraryInfojava.util.List<LibraryInfo> functionListWithCode()
FUNCTION LIST but include the
libraries source implementation in the reply.LibraryInfofunctionList()java.util.List<LibraryInfo> functionListWithCode(java.lang.String libraryNamePattern)
FUNCTION LIST but include the
libraries source implementation in the reply.libraryNamePattern - a pattern for matching library namesLibraryInfofunctionList(String)java.lang.String functionLoad(java.lang.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.java.lang.String functionLoadReplace(java.lang.String functionCode)
functionCode - the source codejava.lang.String functionRestore(byte[] serializedValue)
serializedValue - the serialized payloadjava.lang.String functionRestore(byte[] serializedValue,
FunctionRestorePolicy policy)
serializedValue - the serialized payloadpolicy - can be FLUSH, APPEND or REPLACEFunctionStats functionStats()
FunctionStatsCopyright © 2025. All rights reserved.