Package org.redisson

Class RedissonScript

    • Method Detail

      • scriptLoad

        public String scriptLoad(String luaScript)
        Description copied from interface: RScript
        Loads Lua script into Redis scripts cache and returns its SHA-1 digest
        Specified by:
        scriptLoad in interface RScript
        Parameters:
        luaScript - - lua script
        Returns:
        SHA-1 digest
      • scriptLoadAsync

        public RFuture<String> scriptLoadAsync(String luaScript)
        Description copied from interface: RScriptAsync
        Loads Lua script into Redis scripts cache and returns its SHA-1 digest
        Specified by:
        scriptLoadAsync in interface RScriptAsync
        Parameters:
        luaScript - - lua script
        Returns:
        SHA-1 digest
      • scriptLoadAsync

        public RFuture<String> scriptLoadAsync(String key,
                                               String luaScript)
        Description copied from interface: RScriptAsync
        Loads Lua script into Redis scripts cache and returns its SHA-1 digest
        Specified by:
        scriptLoadAsync in interface RScriptAsync
        Parameters:
        key - - used to locate Redis node in Cluster which stores cached Lua script
        luaScript - - lua script
        Returns:
        SHA-1 digest
      • eval

        public <R> R eval(RScript.Mode mode,
                          String luaScript,
                          RScript.ReturnType returnType)
        Description copied from interface: RScript
        Executes Lua script
        Specified by:
        eval in interface RScript
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        luaScript - - lua script
        returnType - - return type
        Returns:
        result object
      • eval

        public <R> R eval(RScript.Mode mode,
                          String luaScript,
                          RScript.ReturnType returnType,
                          List<Object> keys,
                          Object... values)
        Description copied from interface: RScript
        Executes Lua script
        Specified by:
        eval in interface RScript
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        luaScript - - lua script
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object
      • evalAsync

        public <R> RFuture<R> evalAsync(RScript.Mode mode,
                                        String luaScript,
                                        RScript.ReturnType returnType,
                                        List<Object> keys,
                                        Object... values)
        Description copied from interface: RScriptAsync
        Executes Lua script
        Specified by:
        evalAsync in interface RScriptAsync
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        luaScript - - lua script
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object
      • evalSha

        public <R> R evalSha(RScript.Mode mode,
                             String shaDigest,
                             RScript.ReturnType returnType)
        Description copied from interface: RScript
        Executes Lua script stored in Redis scripts cache by SHA-1 digest
        Specified by:
        evalSha in interface RScript
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        shaDigest - - SHA-1 digest
        returnType - - return type
        Returns:
        result object
      • evalSha

        public <R> R evalSha(RScript.Mode mode,
                             String shaDigest,
                             RScript.ReturnType returnType,
                             List<Object> keys,
                             Object... values)
        Description copied from interface: RScript
        Executes Lua script stored in Redis scripts cache by SHA-1 digest
        Specified by:
        evalSha in interface RScript
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        shaDigest - - SHA-1 digest
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object
      • evalShaAsync

        public <R> RFuture<R> evalShaAsync(RScript.Mode mode,
                                           String shaDigest,
                                           RScript.ReturnType returnType,
                                           List<Object> keys,
                                           Object... values)
        Description copied from interface: RScriptAsync
        Executes Lua script stored in Redis scripts cache by SHA-1 digest
        Specified by:
        evalShaAsync in interface RScriptAsync
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        shaDigest - - SHA-1 digest
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object
      • scriptKill

        public void scriptKill()
        Description copied from interface: RScript
        Kills currently executed Lua script
        Specified by:
        scriptKill in interface RScript
      • scriptKill

        public void scriptKill(String key)
      • scriptExists

        public List<Boolean> scriptExists(String... shaDigests)
        Description copied from interface: RScript
        Checks for presence Lua scripts in Redis script cache by SHA-1 digest.
        Specified by:
        scriptExists in interface RScript
        Parameters:
        shaDigests - - collection of SHA-1 digests
        Returns:
        list of booleans corresponding to collection SHA-1 digests
      • scriptExistsAsync

        public RFuture<List<Boolean>> scriptExistsAsync(String... shaDigests)
        Description copied from interface: RScriptAsync
        Checks for presence Lua scripts in Redis script cache by SHA-1 digest.
        Specified by:
        scriptExistsAsync in interface RScriptAsync
        Parameters:
        shaDigests - - collection of SHA-1 digests
        Returns:
        list of booleans corresponding to collection SHA-1 digests
      • scriptExistsAsync

        public RFuture<List<Boolean>> scriptExistsAsync(String key,
                                                        String... shaDigests)
        Description copied from interface: RScriptAsync
        Checks for presence Lua scripts in Redis script cache by SHA-1 digest.
        Specified by:
        scriptExistsAsync in interface RScriptAsync
        Parameters:
        key - - used to locate Redis node in Cluster which stores cached Lua script
        shaDigests - - collection of SHA-1 digests
        Returns:
        list of booleans corresponding to collection SHA-1 digests
      • scriptFlush

        public void scriptFlush()
        Description copied from interface: RScript
        Flushes Lua script cache.
        Specified by:
        scriptFlush in interface RScript
      • scriptFlush

        public void scriptFlush(String key)
      • evalShaAsync

        public <R> RFuture<R> evalShaAsync(RScript.Mode mode,
                                           String shaDigest,
                                           RScript.ReturnType returnType)
        Description copied from interface: RScriptAsync
        Executes Lua script stored in Redis scripts cache by SHA-1 digest
        Specified by:
        evalShaAsync in interface RScriptAsync
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        shaDigest - - SHA-1 digest
        returnType - - return type
        Returns:
        result object
      • evalAsync

        public <R> RFuture<R> evalAsync(RScript.Mode mode,
                                        String luaScript,
                                        RScript.ReturnType returnType)
        Description copied from interface: RScriptAsync
        Executes Lua script
        Specified by:
        evalAsync in interface RScriptAsync
        Type Parameters:
        R - - type of result
        Parameters:
        mode - - execution mode
        luaScript - - lua script
        returnType - - return type
        Returns:
        result object
      • evalShaAsync

        public <R> RFuture<R> evalShaAsync(String key,
                                           RScript.Mode mode,
                                           String shaDigest,
                                           RScript.ReturnType returnType,
                                           List<Object> keys,
                                           Object... values)
        Description copied from interface: RScriptAsync
        Executes Lua script stored in Redis scripts cache by SHA-1 digest
        Specified by:
        evalShaAsync in interface RScriptAsync
        Type Parameters:
        R - - type of result
        Parameters:
        key - - used to locate Redis node in Cluster which stores cached Lua script
        mode - - execution mode
        shaDigest - - SHA-1 digest
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object
      • evalAsync

        public <R> RFuture<R> evalAsync(String key,
                                        RScript.Mode mode,
                                        String luaScript,
                                        RScript.ReturnType returnType,
                                        List<Object> keys,
                                        Object... values)
        Description copied from interface: RScriptAsync
        Executes Lua script
        Specified by:
        evalAsync in interface RScriptAsync
        Type Parameters:
        R - - type of result
        Parameters:
        key - - used to locate Redis node in Cluster which stores cached Lua script
        mode - - execution mode
        luaScript - - lua script
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object
      • evalSha

        public <R> R evalSha(String key,
                             RScript.Mode mode,
                             String shaDigest,
                             RScript.ReturnType returnType,
                             List<Object> keys,
                             Object... values)
        Description copied from interface: RScript
        Executes Lua script stored in Redis scripts cache by SHA-1 digest
        Specified by:
        evalSha in interface RScript
        Type Parameters:
        R - - type of result
        Parameters:
        key - - used to locate Redis node in Cluster which stores cached Lua script
        mode - - execution mode
        shaDigest - - SHA-1 digest
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object
      • eval

        public <R> R eval(String key,
                          RScript.Mode mode,
                          String luaScript,
                          RScript.ReturnType returnType,
                          List<Object> keys,
                          Object... values)
        Description copied from interface: RScript
        Executes Lua script
        Specified by:
        eval in interface RScript
        Type Parameters:
        R - - type of result
        Parameters:
        key - - used to locate Redis node in Cluster which stores cached Lua script
        mode - - execution mode
        luaScript - - lua script
        returnType - - return type
        keys - - keys available through KEYS param in script
        values - - values available through VALUES param in script
        Returns:
        result object