Skip to content

Commit

Permalink
Fix Scripting Documentation for imperative Lua scripts.
Browse files Browse the repository at this point in the history
See #3010
  • Loading branch information
mp911de committed Oct 10, 2024
1 parent 2df0361 commit 8fe72a0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/main/antora/modules/ROOT/pages/redis/scripting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Example {
RedisScript<Boolean> script;
public boolean checkAndSet(String expectedValue, String newValue) {
return redisOperations.execute(script, singletonList("key"), asList(expectedValue, newValue));
return redisOperations.execute(script, singletonList("key"), expectedValue, newValue);
}
}
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* <p>
* Streams of methods returning {@code Mono<K>} or {@code Flux<M>} are terminated with
* {@link org.springframework.dao.InvalidDataAccessApiUsageException} when
* {@link org.springframework.data.redis.serializer.RedisElementReader#read(ByteBuffer)} returns {@code null} for a
* particular element as Reactive Streams prohibit the usage of {@code null} values.
* {@link org.springframework.data.redis.serializer.RedisElementReader#read(ByteBuffer)} returns {@literal null} for a
* particular element as Reactive Streams prohibit the usage of {@literal null} values.
*
* @author Mark Paluch
* @author Christoph Strobl
Expand All @@ -45,7 +45,7 @@ public interface ReactiveScriptExecutor<K> {
*
* @param script must not be {@literal null}.
* @return the return value of the script or {@link Flux#empty()} if {@link RedisScript#getResultType()} is
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK")
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK").
*/
default <T> Flux<T> execute(RedisScript<T> script) {
return execute(script, Collections.emptyList());
Expand All @@ -57,7 +57,7 @@ default <T> Flux<T> execute(RedisScript<T> script) {
* @param script must not be {@literal null}.
* @param keys must not be {@literal null}.
* @return the return value of the script or {@link Flux#empty()} if {@link RedisScript#getResultType()} is
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK")
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK").
*/
default <T> Flux<T> execute(RedisScript<T> script, List<K> keys) {
return execute(script, keys, Collections.emptyList());
Expand All @@ -67,8 +67,8 @@ default <T> Flux<T> execute(RedisScript<T> script, List<K> keys) {
* Executes the given {@link RedisScript}
*
* @param script The script to execute. Must not be {@literal null}.
* @param keys Any keys that need to be passed to the script. Must not be {@literal null}.
* @param args Any args that need to be passed to the script. Can be {@literal empty}.
* @param keys any keys that need to be passed to the script. Must not be {@literal null}.
* @param args any args that need to be passed to the script. Can be {@literal empty}.
* @return The return value of the script or {@link Flux#empty()} if {@link RedisScript#getResultType()} is
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK")
*/
Expand All @@ -79,8 +79,8 @@ default <T> Flux<T> execute(RedisScript<T> script, List<K> keys) {
* arguments and result.
*
* @param script The script to execute. must not be {@literal null}.
* @param keys Any keys that need to be passed to the script
* @param args Any args that need to be passed to the script
* @param keys any keys that need to be passed to the script.
* @param args any args that need to be passed to the script.
* @param argsWriter The {@link RedisElementWriter} to use for serializing args. Must not be {@literal null}.
* @param resultReader The {@link RedisElementReader} to use for serializing the script return value. Must not be
* {@literal null}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ public interface ScriptExecutor<K> {
/**
* Executes the given {@link RedisScript}
*
* @param script The script to execute
* @param keys Any keys that need to be passed to the script
* @param args Any args that need to be passed to the script
* @return The return value of the script or null if {@link RedisScript#getResultType()} is null, likely indicating a
* throw-away status reply (i.e. "OK")
* @param script the script to execute.
* @param keys any keys that need to be passed to the script.
* @param args any args that need to be passed to the script.
* @return The return value of the script or {@literal null} if {@link RedisScript#getResultType()} is
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK").
*/
<T> T execute(RedisScript<T> script, List<K> keys, Object... args);

/**
* Executes the given {@link RedisScript}, using the provided {@link RedisSerializer}s to serialize the script
* arguments and result.
*
* @param script The script to execute
* @param argsSerializer The {@link RedisSerializer} to use for serializing args
* @param resultSerializer The {@link RedisSerializer} to use for serializing the script return value
* @param keys Any keys that need to be passed to the script
* @param args Any args that need to be passed to the script
* @return The return value of the script or null if {@link RedisScript#getResultType()} is null, likely indicating a
* throw-away status reply (i.e. "OK")
* @param script the script to execute.
* @param argsSerializer The {@link RedisSerializer} to use for serializing args.
* @param resultSerializer The {@link RedisSerializer} to use for serializing the script return value.
* @param keys any keys that need to be passed to the script.
* @param args any args that need to be passed to the script.
* @return The return value of the script or {@literal null} if {@link RedisScript#getResultType()} is
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK").
*/
<T> T execute(RedisScript<T> script, RedisSerializer<?> argsSerializer, RedisSerializer<T> resultSerializer,
List<K> keys, Object... args);
Expand Down

0 comments on commit 8fe72a0

Please sign in to comment.