Fix broken Javadoc.

Closes #3148
This commit is contained in:
Mark Paluch
2025-05-12 11:52:30 +02:00
parent e01347cd3d
commit e3b1f2022c
22 changed files with 75 additions and 92 deletions

View File

@@ -437,12 +437,12 @@ public class RedisCacheConfiguration {
* <p>
* The following converters get registered:
* <ul>
* <li>{@link String} to {@link byte byte[]} using UTF-8 encoding.</li>
* <li>{@link String} to {@code byte byte[]} using UTF-8 encoding.</li>
* <li>{@link SimpleKey} to {@link String}</li>
* </ul>
*
* @param registry {@link ConverterRegistry} in which the {@link Converter key converters} are registered;
* must not be {@literal null}.
* @param registry {@link ConverterRegistry} in which the {@link Converter key converters} are registered; must not be
* {@literal null}.
* @see org.springframework.core.convert.converter.ConverterRegistry
*/
public static void registerDefaultConverters(ConverterRegistry registry) {

View File

@@ -182,13 +182,13 @@ public interface RedisCacheWriter extends CacheStatisticsProvider {
/**
* Asynchronously retrieves the {@link CompletableFuture value} to which the {@link RedisCache} maps the given
* {@link byte[] key}.
* {@code byte[] key}.
* <p>
* This operation is non-blocking.
*
* @param name {@link String} with the name of the {@link RedisCache}.
* @param key {@link byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
* @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@link byte[] key}.
* @param key {@code byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
* @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@code byte[] key}.
* @see #retrieve(String, byte[], Duration)
* @since 3.2
*/
@@ -198,14 +198,14 @@ public interface RedisCacheWriter extends CacheStatisticsProvider {
/**
* Asynchronously retrieves the {@link CompletableFuture value} to which the {@link RedisCache} maps the given
* {@link byte[] key} setting the {@link Duration TTL expiration} for the cache entry.
* {@code byte[] key} setting the {@link Duration TTL expiration} for the cache entry.
* <p>
* This operation is non-blocking.
*
* @param name {@link String} with the name of the {@link RedisCache}.
* @param key {@link byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
* @param key {@code byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
* @param ttl {@link Duration} specifying the {@literal expiration timeout} for the cache entry.
* @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@link byte[] key}.
* @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@code byte[] key}.
* @since 3.2
*/
CompletableFuture<byte[]> retrieve(String name, byte[] key, @Nullable Duration ttl);

View File

@@ -471,9 +471,9 @@ public class ClusterCommandExecutor implements DisposableBean {
}
/**
* Return the {@link byte[] key} mapped to the value stored in Redis.
* Return the {@code byte[] key} mapped to the value stored in Redis.
*
* @return a {@link byte[] byte array} of the key mapped to the value stored in Redis.
* @return a {@code byte[] byte array} of the key mapped to the value stored in Redis.
*/
public byte[] getKey() {
return this.key.getArray();

View File

@@ -1974,7 +1974,7 @@ public interface ReactiveZSetCommands {
}
/**
* Get the size of sorted set with {@linByteBuffer keyCommand#getKey()}.
* Get the size of sorted set with {@link ByteBuffer keyCommand#getKey()}.
*
* @param commands must not be {@literal null}.
* @return

View File

@@ -46,12 +46,12 @@ public enum ReturnType {
MULTI,
/**
* Returned as {@literal byte[]}
* Returned as {@code byte[]}
*/
STATUS,
/**
* Returned as {@literal byte[]}
* Returned as {@code byte[]}
*/
VALUE;

View File

@@ -15,50 +15,6 @@
*/
package org.springframework.data.redis.connection.jedis;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.convert.converter.Converter;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.redis.ExceptionTranslationStrategy;
import org.springframework.data.redis.FallbackExceptionTranslationStrategy;
import org.springframework.data.redis.RedisSystemException;
import org.springframework.data.redis.connection.AbstractRedisConnection;
import org.springframework.data.redis.connection.FutureResult;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.data.redis.connection.RedisCommands;
import org.springframework.data.redis.connection.RedisGeoCommands;
import org.springframework.data.redis.connection.RedisHashCommands;
import org.springframework.data.redis.connection.RedisHyperLogLogCommands;
import org.springframework.data.redis.connection.RedisKeyCommands;
import org.springframework.data.redis.connection.RedisListCommands;
import org.springframework.data.redis.connection.RedisNode;
import org.springframework.data.redis.connection.RedisPipelineException;
import org.springframework.data.redis.connection.RedisScriptingCommands;
import org.springframework.data.redis.connection.RedisServerCommands;
import org.springframework.data.redis.connection.RedisSetCommands;
import org.springframework.data.redis.connection.RedisStreamCommands;
import org.springframework.data.redis.connection.RedisStringCommands;
import org.springframework.data.redis.connection.RedisSubscribedConnectionException;
import org.springframework.data.redis.connection.RedisZSetCommands;
import org.springframework.data.redis.connection.Subscription;
import org.springframework.data.redis.connection.convert.TransactionResultConverter;
import org.springframework.data.redis.connection.jedis.JedisInvoker.ResponseCommands;
import org.springframework.data.redis.connection.jedis.JedisResult.JedisResultBuilder;
import org.springframework.data.redis.connection.jedis.JedisResult.JedisStatusResult;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import redis.clients.jedis.BuilderFactory;
import redis.clients.jedis.CommandArguments;
import redis.clients.jedis.CommandObject;
@@ -74,6 +30,33 @@ import redis.clients.jedis.commands.ServerCommands;
import redis.clients.jedis.exceptions.JedisDataException;
import redis.clients.jedis.util.Pool;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.convert.converter.Converter;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.redis.ExceptionTranslationStrategy;
import org.springframework.data.redis.FallbackExceptionTranslationStrategy;
import org.springframework.data.redis.RedisSystemException;
import org.springframework.data.redis.connection.*;
import org.springframework.data.redis.connection.convert.TransactionResultConverter;
import org.springframework.data.redis.connection.jedis.JedisInvoker.ResponseCommands;
import org.springframework.data.redis.connection.jedis.JedisResult.JedisResultBuilder;
import org.springframework.data.redis.connection.jedis.JedisResult.JedisStatusResult;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
/**
* {@code RedisConnection} implementation on top of <a href="https://github.com/redis/jedis">Jedis</a> library.
* <p>
@@ -148,7 +131,7 @@ public class JedisConnection extends AbstractRedisConnection {
}
/**
* Constructs a new <{@link JedisConnection} backed by a Jedis {@link Pool}.
* Constructs a new {@link JedisConnection} backed by a Jedis {@link Pool}.
*
* @param jedis {@link Jedis} client.
* @param pool {@link Pool} of Redis connections; can be null, if no pool is used.
@@ -159,7 +142,7 @@ public class JedisConnection extends AbstractRedisConnection {
}
/**
* Constructs a new <{@link JedisConnection} backed by a Jedis {@link Pool}.
* Constructs a new {@link JedisConnection} backed by a Jedis {@link Pool}.
*
* @param jedis {@link Jedis} client.
* @param pool {@link Pool} of Redis connections; can be null, if no pool is used.
@@ -172,7 +155,7 @@ public class JedisConnection extends AbstractRedisConnection {
}
/**
* Constructs a new <{@link JedisConnection} backed by a Jedis {@link Pool}.
* Constructs a new {@link JedisConnection} backed by a Jedis {@link Pool}.
*
* @param jedis {@link Jedis} client.
* @param pool {@link Pool} of Redis connections; can be null, if no pool is used.

View File

@@ -565,7 +565,7 @@ public class LettuceConnectionFactory implements RedisConnectionFactory, Reactiv
* connection factory configuration. Eager initialization also prevents blocking connect while using reactive API and
* is recommended for reactive API usage.
*
* @return {@link true} if the shared connection is initialized upon {@link #start()}.
* @return {@literal true} if the shared connection is initialized upon {@link #start()}.
* @since 2.2
* @see #start()
*/
@@ -1239,7 +1239,7 @@ public class LettuceConnectionFactory implements RedisConnectionFactory, Reactiv
}
/**
* @return the shared connection using {@literal byte[]} encoding for imperative API use. {@literal null} if
* @return the shared connection using {@code byte[]} encoding for imperative API use. {@literal null} if
* {@link #getShareNativeConnection() connection sharing} is disabled or when connected to Redis Cluster.
*/
@Nullable
@@ -1251,7 +1251,7 @@ public class LettuceConnectionFactory implements RedisConnectionFactory, Reactiv
}
/**
* @return the shared cluster connection using {@literal byte[]} encoding for imperative API use. {@literal null} if
* @return the shared cluster connection using {@code byte[]} encoding for imperative API use. {@literal null} if
* {@link #getShareNativeConnection() connection sharing} is disabled or when connected to Redis
* Standalone/Sentinel/Master-Replica.
* @since 2.5.7

View File

@@ -59,12 +59,12 @@ class StreamSerialization {
}
/**
* Returns whether the given {@link RedisSerializer} is capable of serializing the {@code value} to {@literal byte[]}.
* Returns whether the given {@link RedisSerializer} is capable of serializing the {@code value} to {@code byte[]}.
*
* @param serializer the serializer. Can be {@literal null}.
* @param value the value to serialize.
* @return {@literal true} if the given {@link RedisSerializer} is capable of serializing the {@code value} to
* {@literal byte[]}.
* {@code byte[]}.
*/
private static boolean canSerialize(@Nullable RedisSerializer<?> serializer, @Nullable Object value) {
return serializer != null && (value == null || serializer.canSerialize(value.getClass()));

View File

@@ -30,8 +30,8 @@ import org.springframework.lang.Nullable;
* Simple class containing various decoding utilities.
*
* @author Costin Leau
* @auhtor Christoph Strobl
* @auhtor Mark Paluch
* @author Christoph Strobl
* @author Mark Paluch
*/
public abstract class DecodeUtils {

View File

@@ -36,7 +36,7 @@ public class DefaultTuple implements Tuple {
/**
* Constructs a new {@link DefaultTuple}.
*
* @param value {@link byte[]} of the member's raw value.
* @param value {@code byte[]} of the member's raw value.
* @param score {@link Double score} of the raw value used in sorting.
*/
public DefaultTuple(byte[] value, Double score) {

View File

@@ -361,8 +361,8 @@ public interface ReactiveListOperations<K, V> {
*
* @param key must not be {@literal null}.
* @param timeout maximal duration to wait until an entry in the list at {@code key} is available. Must be either
* {@link Duration#ZERO} or greater {@link 1 second}, must not be {@literal null}. A timeout of zero can be
* used to wait indefinitely. Durations between zero and one second are not supported.
* {@link Duration#ZERO} or greater {@literal 1 second}, must not be {@literal null}. A timeout of zero can
* be used to wait indefinitely. Durations between zero and one second are not supported.
* @return
* @see <a href="https://redis.io/commands/blpop">Redis Documentation: BLPOP</a>
*/
@@ -394,8 +394,8 @@ public interface ReactiveListOperations<K, V> {
*
* @param key must not be {@literal null}.
* @param timeout maximal duration to wait until an entry in the list at {@code key} is available. Must be either
* {@link Duration#ZERO} or greater {@link 1 second}, must not be {@literal null}. A timeout of zero can be
* used to wait indefinitely. Durations between zero and one second are not supported.
* {@link Duration#ZERO} or greater {@literal 1 second}, must not be {@literal null}. A timeout of zero can
* be used to wait indefinitely. Durations between zero and one second are not supported.
* @return
* @see <a href="https://redis.io/commands/brpop">Redis Documentation: BRPOP</a>
*/
@@ -418,8 +418,8 @@ public interface ReactiveListOperations<K, V> {
* @param sourceKey must not be {@literal null}.
* @param destinationKey must not be {@literal null}.
* @param timeout maximal duration to wait until an entry in the list at {@code sourceKey} is available. Must be
* either {@link Duration#ZERO} or greater {@link 1 second}, must not be {@literal null}. A timeout of zero
* can be used to wait indefinitely. Durations between zero and one second are not supported.
* either {@link Duration#ZERO} or greater {@literal 1 second}, must not be {@literal null}. A timeout of
* zero can be used to wait indefinitely. Durations between zero and one second are not supported.
* @return
* @see <a href="https://redis.io/commands/brpoplpush">Redis Documentation: BRPOPLPUSH</a>
*/

View File

@@ -507,8 +507,8 @@ public interface ReactiveZSetOperations<K, V> {
*
* @param key must not be {@literal null}.
* @param timeout maximal duration to wait until an entry in the list at {@code key} is available. Must be either
* {@link Duration#ZERO} or greater {@link 1 second}, must not be {@literal null}. A timeout of zero can be
* used to wait indefinitely. Durations between zero and one second are not supported.
* {@link Duration#ZERO} or greater {@literal 1 second}, must not be {@literal null}. A timeout of zero can
* be used to wait indefinitely. Durations between zero and one second are not supported.
* @return
* @see <a href="https://redis.io/commands/zpopmin">Redis Documentation: ZPOPMIN</a>
* @since 2.6
@@ -541,8 +541,8 @@ public interface ReactiveZSetOperations<K, V> {
*
* @param key must not be {@literal null}.
* @param timeout maximal duration to wait until an entry in the list at {@code key} is available. Must be either
* {@link Duration#ZERO} or greater {@link 1 second}, must not be {@literal null}. A timeout of zero can be
* used to wait indefinitely. Durations between zero and one second are not supported.
* {@link Duration#ZERO} or greater {@literal 1 second}, must not be {@literal null}. A timeout of zero can
* be used to wait indefinitely. Durations between zero and one second are not supported.
* @return
* @see <a href="https://redis.io/commands/zpopmin">Redis Documentation: ZPOPMIN</a>
* @since 2.6

View File

@@ -646,7 +646,7 @@ public abstract class RedisConnectionUtils {
* <p>
* This will typically be the native driver {@link RedisConnection} or a wrapper from a connection pool.
*
* @return the underlying {@link RedisConnection} (never {@link null}).
* @return the underlying {@link RedisConnection} (never {@literal null}).
*/
RedisConnection getTargetConnection();

View File

@@ -571,11 +571,11 @@ public class RedisKeyValueAdapter extends AbstractKeyValueAdapter
}
/**
* Creates a new {@link byte[] key} using the given {@link String keyspace} and {@link String id}.
* Creates a new {@code byte[] key} using the given {@link String keyspace} and {@link String id}.
*
* @param keyspace {@link String name} of the Redis {@literal keyspace}.
* @param id {@link String} identifying the key.
* @return a {@link byte[]} constructed from the {@link String keyspace} and {@link String id}.
* @return a {@code byte[]} constructed from the {@link String keyspace} and {@link String id}.
*/
public byte[] createKey(String keyspace, String id) {
return toBytes(keyspace + ":" + id);

View File

@@ -178,7 +178,7 @@ public class Bucket {
* Get all the keys matching a given path.
*
* @param path the path to look for. Can be {@literal null}.
* @return all keys if path is {@null} or empty.
* @return all keys if path is {@literal null} or empty.
*/
public Set<String> extractAllKeysFor(String path) {

View File

@@ -242,7 +242,7 @@ public interface RedisSerializationContext<K, V> {
}
/**
* Creates a pass through {@link SerializationPair} to pass-thru {@link byte} objects.
* Creates a pass through {@link SerializationPair} to pass-thru {@code byte} objects.
*
* @return a pass through {@link SerializationPair}.
* @since 2.2

View File

@@ -65,7 +65,7 @@ public interface RedisSerializer<T> {
}
/**
* Obtain a simple {@link java.lang.String} to {@literal byte[]} (and back) serializer using
* Obtain a simple {@link java.lang.String} to {@code byte[]} (and back) serializer using
* {@link java.nio.charset.StandardCharsets#UTF_8 UTF-8} as the default {@link java.nio.charset.Charset}.
*
* @return never {@literal null}.

View File

@@ -55,7 +55,7 @@ class RedisSerializerToSerializationPairAdapter<T> implements SerializationPair<
}
/**
* @return the {@link RedisSerializerToSerializationPairAdapter} for {@link byte[]}.
* @return the {@link RedisSerializerToSerializationPairAdapter} for {@code byte[]}.
* @since 2.2
*/
static SerializationPair<byte[]> byteArray() {

View File

@@ -22,7 +22,7 @@ import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
* Simple {@link java.lang.String} to {@literal byte[]} (and back) serializer. Converts {@link java.lang.String Strings}
* Simple {@link java.lang.String} to {@code byte[]} (and back) serializer. Converts {@link java.lang.String Strings}
* into bytes and vice-versa using the specified charset (by default {@literal UTF-8}).
* <p>
* Useful when the interaction with the Redis happens mainly through Strings.

View File

@@ -94,7 +94,7 @@ import org.springframework.util.ErrorHandler;
* <pre class="code">
* RedisConnectionFactory factory = …;
*
* StreamMessageListenerContainer<String, MapRecord<String, String, String>> container = StreamMessageListenerContainer.create(factory);
* StreamMessageListenerContainer&lt;String, MapRecord&lt;String, String, String&gt;&gt; container = StreamMessageListenerContainer.create(factory);
* Subscription subscription = container.receive(StreamOffset.fromStart("my-stream"), message -> …);
*
* container.start();

View File

@@ -90,10 +90,10 @@ import org.springframework.util.Assert;
* <pre class="code">
* ReactiveRedisConnectionFactory factory = …;
*
* StreamReceiver<String, String, String> receiver = StreamReceiver.create(factory);
* Flux<MapRecord<String, String, String>> records = receiver.receive(StreamOffset.fromStart("my-stream"));
* StreamReceiver&lt;String, String, String&gt; receiver = StreamReceiver.create(factory);
* Flux&lt;MapRecord&lt;String, String, String&gt;&gt; records = receiver.receive(StreamOffset.fromStart("my-stream"));
*
* recordFlux.doOnNext(record -> …);
* recordFlux.doOnNext(record -&gt; …);
* </pre>
*
* @author Mark Paluch

View File

@@ -7,7 +7,7 @@
* For collections without duplicates the obvious candidate is
* {@link org.springframework.data.redis.support.collections.RedisSet}. Use
* {@link org.springframework.data.redis.support.collections.RedisZSet} if a certain order is required.
* </p/>
* <p>
* Lastly, for key/value associations {@link org.springframework.data.redis.support.collections.RedisMap} providing a
* Map-like abstraction on top of a Redis hash.
*/