Package redis.clients.jedis.commands
Interface FunctionBinaryCommands
- All Known Subinterfaces:
JedisBinaryCommands
- All Known Implementing Classes:
Jedis,JedisCluster,JedisPooled,JedisSentineled,JedisSharding,UnifiedJedis
public interface FunctionBinaryCommands
-
Method Summary
Modifier and TypeMethodDescriptionInvoke a function.fcallReadonly(byte[] name, List<byte[]> keys, List<byte[]> args) functionDelete(byte[] libraryName) This command deletes the library called library-name and all functions in it.byte[]Return the serialized payload of loaded libraries.Deletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.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.Kill a function that is currently executing.functionList(byte[] libraryNamePattern) Return information about the functions and libraries.Return information about the functions and libraries.functionListWithCode(byte[] libraryNamePattern) Similar toFUNCTION LISTbut include the libraries source implementation in the reply.Similar toFUNCTION LISTbut include the libraries source implementation in the reply.functionLoad(byte[] functionCode) Load a library to Redis.functionLoadReplace(byte[] functionCode) Load a library to Redis.functionRestore(byte[] serializedValue) Restore libraries from the serialized payload.functionRestore(byte[] serializedValue, FunctionRestorePolicy policy) Restore libraries from the serialized payload.Return information about the function that's currently running and information about the available execution engines.
-
Method Details
-
fcall
Invoke a function.- Parameters:
name-keys-args-- Returns:
-
fcallReadonly
-
functionDelete
This command deletes the library called library-name and all functions in it. If the library doesn't exist, the server returns an error.- Parameters:
libraryName-- Returns:
- OK
-
functionDump
byte[] functionDump()Return the serialized payload of loaded libraries. You can restore the serialized payload later with theFUNCTION RESTOREcommand.- Returns:
- the serialized payload
-
functionFlush
String functionFlush()Deletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.- Returns:
- OK
-
functionFlush
Deletes all the libraries, unless called with the optional mode argument, the 'lazyfree-lazy-user-flush' configuration directive sets the effective behavior.- Parameters:
mode- ASYNC: Asynchronously flush the libraries, SYNC: Synchronously flush the libraries.- Returns:
- OK
-
functionKill
String functionKill()Kill a function that is currently executing. The command can be used only on functions that did not modify the dataset during their execution.- Returns:
- OK
-
functionListBinary
Return information about the functions and libraries.- Returns:
LibraryInfo
-
functionList
Return information about the functions and libraries.- Parameters:
libraryNamePattern- a pattern for matching library names- Returns:
LibraryInfo
-
functionListWithCodeBinary
Similar toFUNCTION LISTbut include the libraries source implementation in the reply.- Returns:
LibraryInfo- See Also:
-
functionListWithCode
Similar toFUNCTION LISTbut include the libraries source implementation in the reply.- Parameters:
libraryNamePattern- a pattern for matching library names- Returns:
LibraryInfo- See Also:
-
functionLoad
Load a library to Redis.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.- Parameters:
functionCode- the source code.- Returns:
- The library name that was loaded
-
functionLoadReplace
Load a library to Redis. Will replace the current library if it already exists.- Parameters:
functionCode- the source code- Returns:
- The library name that was loaded
-
functionRestore
Restore libraries from the serialized payload. Default policy is APPEND.- Parameters:
serializedValue- the serialized payload- Returns:
- OK
-
functionRestore
Restore libraries from the serialized payload.- Parameters:
serializedValue- the serialized payloadpolicy- can beFLUSH, APPEND or REPLACE- Returns:
- OK
-
functionStatsBinary
Object functionStatsBinary()Return information about the function that's currently running and information about the available execution engines.- Returns:
FunctionStats
-