diff --git a/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicDouble.java b/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicDouble.java index c9d4eb90f..c2e16c4ef 100644 --- a/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicDouble.java +++ b/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicDouble.java @@ -51,7 +51,8 @@ public class RedisAtomicDouble extends Number implements Serializable, BoundKeyO private final RedisOperations generalOps; /** - * Constructs a new {@link RedisAtomicDouble} instance. Uses the value existing in Redis or 0 if none is found. + * Constructs a new {@link RedisAtomicDouble} instance. Uses the value existing in Redis or {@code 0} if none is + * found. * * @param redisCounter Redis key of this counter. * @param factory connection factory. @@ -61,11 +62,11 @@ public class RedisAtomicDouble extends Number implements Serializable, BoundKeyO } /** - * Constructs a new {@link RedisAtomicDouble} instance. + * Constructs a new {@link RedisAtomicDouble} instance with a {@code initialValue} that overwrites the existing value. * * @param redisCounter Redis key of this counter. * @param factory connection factory. - * @param initialValue initial value to set if the Redis key is absent. + * @param initialValue initial value to set. */ public RedisAtomicDouble(String redisCounter, RedisConnectionFactory factory, double initialValue) { this(redisCounter, factory, Double.valueOf(initialValue)); @@ -106,10 +107,14 @@ public class RedisAtomicDouble extends Number implements Serializable, BoundKeyO } /** - * Constructs a new {@link RedisAtomicDouble} instance. Note: You need to configure the given {@code template} with - * appropriate {@link RedisSerializer} for the key and value. As an alternative one could use the - * {@link #RedisAtomicDouble(String, RedisConnectionFactory, Double)} constructor which uses appropriate default - * serializers. + * Constructs a new {@link RedisAtomicDouble} instance with a {@code initialValue} that overwrites the existing value + * at {@code redisCounter}. + *

+ * Note: You need to configure the given {@code template} with appropriate {@link RedisSerializer} for the key and + * value. + *

+ * As an alternative one could use the {@link #RedisAtomicDouble(String, RedisConnectionFactory, Double)} constructor + * which uses appropriate default serializers. * * @param redisCounter Redis key of this counter. * @param template the template diff --git a/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicInteger.java b/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicInteger.java index b5a033819..146d69d47 100644 --- a/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicInteger.java +++ b/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicInteger.java @@ -52,7 +52,8 @@ public class RedisAtomicInteger extends Number implements Serializable, BoundKey private final RedisOperations generalOps; /** - * Constructs a new {@link RedisAtomicInteger} instance. Uses the value existing in Redis or 0 if none is found. + * Constructs a new {@link RedisAtomicInteger} instance. Uses the value existing in Redis or {@code 0} if none is + * found. * * @param redisCounter Redis key of this counter. * @param factory connection factory. @@ -62,18 +63,20 @@ public class RedisAtomicInteger extends Number implements Serializable, BoundKey } /** - * Constructs a new {@link RedisAtomicInteger} instance. + * Constructs a new {@link RedisAtomicInteger} instance with a {@code initialValue} that overwrites the existing + * value. * * @param redisCounter Redis key of this counter. * @param factory connection factory. - * @param initialValue initial value to set if the Redis key is absent. + * @param initialValue initial value to set. */ public RedisAtomicInteger(String redisCounter, RedisConnectionFactory factory, int initialValue) { this(redisCounter, factory, Integer.valueOf(initialValue)); } /** - * Constructs a new {@link RedisAtomicInteger} instance. Uses the value existing in Redis or 0 if none is found. + * Constructs a new {@link RedisAtomicInteger} instance. Uses the value existing in Redis or {@code 0} if none is + * found. * * @param redisCounter Redis key of this counter. * @param template the template. @@ -84,10 +87,14 @@ public class RedisAtomicInteger extends Number implements Serializable, BoundKey } /** - * Constructs a new {@link RedisAtomicInteger} instance. Note: You need to configure the given {@code template} with - * appropriate {@link RedisSerializer} for the key and value. As an alternative one could use the - * {@link #RedisAtomicInteger(String, RedisConnectionFactory, Integer)} constructor which uses appropriate default - * serializers. + * Constructs a new {@link RedisAtomicInteger} instance instance with a {@code initialValue} that overwrites the + * existing value. + *

+ * Note: You need to configure the given {@code template} with appropriate {@link RedisSerializer} for the key and + * value. + *

+ * As an alternative one could use the {@link #RedisAtomicInteger(String, RedisConnectionFactory, Integer)} + * constructor which uses appropriate default serializers. * * @param redisCounter Redis key of this counter. * @param template the template. diff --git a/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicLong.java b/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicLong.java index 199d87d87..098d6148c 100644 --- a/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicLong.java +++ b/src/main/java/org/springframework/data/redis/support/atomic/RedisAtomicLong.java @@ -53,7 +53,7 @@ public class RedisAtomicLong extends Number implements Serializable, BoundKeyOpe private final RedisOperations generalOps; /** - * Constructs a new {@link RedisAtomicLong} instance. Uses the value existing in Redis or 0 if none is found. + * Constructs a new {@link RedisAtomicLong} instance. Uses the value existing in Redis or {@code 0} if none is found. * * @param redisCounter Redis key of this counter. * @param factory connection factory. @@ -63,11 +63,12 @@ public class RedisAtomicLong extends Number implements Serializable, BoundKeyOpe } /** - * Constructs a new {@link RedisAtomicLong} instance. + * Constructs a new {@link RedisAtomicLong} instance with a {@code initialValue} that overwrites the existing value at + * {@code redisCounter}. * * @param redisCounter Redis key of this counter. * @param factory connection factory. - * @param initialValue initial value to set if the Redis key is absent. + * @param initialValue initial value to set. */ public RedisAtomicLong(String redisCounter, RedisConnectionFactory factory, long initialValue) { this(redisCounter, factory, Long.valueOf(initialValue)); @@ -96,7 +97,7 @@ public class RedisAtomicLong extends Number implements Serializable, BoundKeyOpe } /** - * Constructs a new {@link RedisAtomicLong} instance. Uses the value existing in Redis or 0 if none is found. + * Constructs a new {@link RedisAtomicLong} instance. Uses the value existing in Redis or {@code 0} if none is found. * * @param redisCounter Redis key of this counter. * @param template the template. @@ -107,7 +108,7 @@ public class RedisAtomicLong extends Number implements Serializable, BoundKeyOpe } /** - * Constructs a new {@link RedisAtomicLong} instance. + * Constructs a new {@link RedisAtomicLong} instance with a {@code initialValue} that overwrites the existing value. *

* Note: You need to configure the given {@code template} with appropriate {@link RedisSerializer} for the key and * value. The key serializer must be able to deserialize to a {@link String} and the value serializer must be able to