Interface FunctionBinaryCommands

All Known Subinterfaces:
JedisBinaryCommands
All Known Implementing Classes:
Jedis, JedisCluster, JedisPooled, JedisSentineled, JedisSharding, UnifiedJedis

public interface FunctionBinaryCommands
  • Method Details

    • fcall

      Object fcall(byte[] name, List<byte[]> keys, List<byte[]> args)
      Invoke a function.
      Parameters:
      name -
      keys -
      args -
      Returns:
    • fcallReadonly

      Object fcallReadonly(byte[] name, List<byte[]> keys, List<byte[]> args)
    • functionDelete

      String functionDelete(byte[] libraryName)
      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 the FUNCTION RESTORE command.
      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

      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.
      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

      List<Object> functionListBinary()
      Return information about the functions and libraries.
      Returns:
      LibraryInfo
    • functionList

      List<Object> functionList(byte[] libraryNamePattern)
      Return information about the functions and libraries.
      Parameters:
      libraryNamePattern - a pattern for matching library names
      Returns:
      LibraryInfo
    • functionListWithCodeBinary

      List<Object> functionListWithCodeBinary()
      Similar to FUNCTION LIST but include the libraries source implementation in the reply.
      Returns:
      LibraryInfo
      See Also:
    • functionListWithCode

      List<Object> functionListWithCode(byte[] libraryNamePattern)
      Similar to FUNCTION LIST but include the libraries source implementation in the reply.
      Parameters:
      libraryNamePattern - a pattern for matching library names
      Returns:
      LibraryInfo
      See Also:
    • functionLoad

      String functionLoad(byte[] functionCode)
      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

      String functionLoadReplace(byte[] functionCode)
      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

      String functionRestore(byte[] serializedValue)
      Restore libraries from the serialized payload. Default policy is APPEND.
      Parameters:
      serializedValue - the serialized payload
      Returns:
      OK
    • functionRestore

      String functionRestore(byte[] serializedValue, FunctionRestorePolicy policy)
      Restore libraries from the serialized payload.
      Parameters:
      serializedValue - the serialized payload
      policy - can be FLUSH, 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