Interface ReactiveScriptingCommands
- All Known Subinterfaces:
ReactiveClusterScriptingCommands
public interface ReactiveScriptingCommands
Redis Scripting commands executed using reactive infrastructure.
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescription<T> reactor.core.publisher.Flux<T>
eval
(ByteBuffer script, ReturnType returnType, int numKeys, ByteBuffer... keysAndArgs) Evaluate givenscript
.<T> reactor.core.publisher.Flux<T>
evalSha
(String scriptSha, ReturnType returnType, int numKeys, ByteBuffer... keysAndArgs) Evaluate givenscriptSha
.default reactor.core.publisher.Mono<Boolean>
scriptExists
(String scriptSha) Check if givenscriptSha
exist in script cache.reactor.core.publisher.Flux<Boolean>
scriptExists
(List<String> scriptShas) Check if givenscriptShas
exist in script cache.reactor.core.publisher.Mono<String>
Flush lua script cache.reactor.core.publisher.Mono<String>
Kill current lua script execution.reactor.core.publisher.Mono<String>
scriptLoad
(ByteBuffer script) Load lua script into scripts cache, without executing it.
Execute the script by callingevalSha(String, ReturnType, int, ByteBuffer...)
.
-
Method Details
-
scriptFlush
reactor.core.publisher.Mono<String> scriptFlush()Flush lua script cache.- See Also:
-
scriptKill
reactor.core.publisher.Mono<String> scriptKill()Kill current lua script execution.- See Also:
-
scriptLoad
Load lua script into scripts cache, without executing it.
Execute the script by callingevalSha(String, ReturnType, int, ByteBuffer...)
.- Parameters:
script
- must not be null.- Returns:
- never null.
- See Also:
-
scriptExists
Check if givenscriptSha
exist in script cache.- Parameters:
scriptSha
- The sha1 of the script is present in script cache. Must not be null.- Returns:
- a
Mono
indicating if script is present.
-
scriptExists
Check if givenscriptShas
exist in script cache.- Parameters:
scriptShas
- must not be null.- Returns:
Flux
emitting one entry per scriptSha in givenList
.- See Also:
-
eval
<T> reactor.core.publisher.Flux<T> eval(ByteBuffer script, ReturnType returnType, int numKeys, ByteBuffer... keysAndArgs) Evaluate givenscript
.- Parameters:
script
- must not be null.returnType
- must not be null. UsingReturnType.MULTI
emits aList
as-is instead of emitting the individual elements from the array response.numKeys
-keysAndArgs
- must not be null.- Returns:
- never null.
- See Also:
-
evalSha
<T> reactor.core.publisher.Flux<T> evalSha(String scriptSha, ReturnType returnType, int numKeys, ByteBuffer... keysAndArgs) Evaluate givenscriptSha
.- Parameters:
scriptSha
- must not be null.returnType
- must not be null. UsingReturnType.MULTI
emits aList
as-is instead of emitting the individual elements from the array response.numKeys
-keysAndArgs
- must not be null.- Returns:
- never null.
- See Also:
-