Interface ScriptingKeyCommands

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

public interface ScriptingKeyCommands
  • Method Details

    • eval

      Object eval(String script)
      Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      Returns:
      The result of the evaluated script
    • eval

      Object eval(String script, int keyCount, String... params)
      Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      keyCount - the count of the provided keys
      params - arguments that can be accessed from the script
      Returns:
      The result of the evaluated script
    • eval

      Object eval(String script, List<String> keys, List<String> args)
      Eval Command Use to evaluate scripts using the Lua interpreter built into Redis starting from version 2.6.0.
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      keys - arguments that can be accessed by the script
      args - additional arguments should not represent key names and can be accessed by the script
      Returns:
      The result of the evaluated script
    • evalReadonly

      Object evalReadonly(String script, List<String> keys, List<String> args)
      Readonly version of EVAL
      Parameters:
      script - Lua 5.1 script. The script does not need to define a Lua function (and should not). It is just a Lua program that will run in the context of the Redis server.
      keys - arguments that can be accessed by the script
      args - additional arguments should not represent key names and can be accessed by the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalsha

      Object evalsha(String sha1)
      EvalSha Command Similar to EVAL, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalsha

      Object evalsha(String sha1, int keyCount, String... params)
      EvalSha Command Similar to eval(String, int, String...) EVAL}, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalsha

      Object evalsha(String sha1, List<String> keys, List<String> args)
      EvalSha Command Similar to eval(String, List, List) EVAL}, but the script cached on the server side by its SHA1 digest. Scripts are cached on the server side using the SCRIPT LOAD command.
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also:
    • evalshaReadonly

      Object evalshaReadonly(String sha1, List<String> keys, List<String> args)
      Readonly version of EVAL
      Parameters:
      sha1 - the script
      Returns:
      The result of the evaluated script
      See Also: