Skip to content

Commit 0999c04

Browse files
committed
DATAREDIS-532 - Enhance JavaDoc and convert links to Redis documentation.
Extend JavaDoc documentation for Command/Connection/Operation interfaces. Align method ordering in operation interfaces with connection/commands interfaces.
1 parent 154f74c commit 0999c04

30 files changed

+3501
-1242
lines changed

src/main/java/org/springframework/data/redis/connection/HyperLogLogCommands.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 the original author or authors.
2+
* Copyright 2014-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,32 +19,36 @@
1919
* {@literal HyperLogLog} specific commands supported by Redis.
2020
*
2121
* @author Christoph Strobl
22+
* @author Mark Paluch
2223
* @since 1.5
2324
*/
2425
public interface HyperLogLogCommands {
2526

2627
/**
2728
* Adds given {@literal values} to the HyperLogLog stored at given {@literal key}.
2829
*
29-
* @param key
30-
* @param values
30+
* @param key must not be {@literal null}.
31+
* @param values must not be {@literal null}.
3132
* @return
33+
* @see <a href="http://redis.io/commands/pfadd">Redis Documentation: PFADD</a>
3234
*/
3335
Long pfAdd(byte[] key, byte[]... values);
3436

3537
/**
3638
* Return the approximated cardinality of the structures observed by the HyperLogLog at {@literal key(s)}.
3739
*
38-
* @param keys
40+
* @param keys must not be {@literal null}.
3941
* @return
42+
* @see <a href="http://redis.io/commands/pfcount">Redis Documentation: PFCOUNT</a>
4043
*/
4144
Long pfCount(byte[]... keys);
4245

4346
/**
4447
* Merge N different HyperLogLogs at {@literal sourceKeys} into a single {@literal destinationKey}.
4548
*
46-
* @param destinationKey
47-
* @param sourceKeys
49+
* @param destinationKey must not be {@literal null}.
50+
* @param sourceKeys must not be {@literal null}.
51+
* @see <a href="http://redis.io/commands/pfmerge">Redis Documentation: PFMERGE</a>
4852
*/
4953
void pfMerge(byte[] destinationKey, byte[]... sourceKeys);
5054

src/main/java/org/springframework/data/redis/connection/RedisClusterCommands.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 the original author or authors.
2+
* Copyright 2015-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ public interface RedisClusterCommands {
3636
* Retrieve cluster node information such as {@literal id}, {@literal host}, {@literal port} and {@literal slots}.
3737
*
3838
* @return never {@literal null}.
39+
* @see <a href="https://redis.io/commands/cluster-nodes">Redis Documentation: CLUSTER NODES</a>
3940
*/
4041
Iterable<RedisClusterNode> clusterGetNodes();
4142

@@ -44,13 +45,15 @@ public interface RedisClusterCommands {
4445
*
4546
* @param master must not be {@literal null}.
4647
* @return never {@literal null}.
48+
* @see <a href="https://redis.io/commands/cluster-slaves">Redis Documentation: CLUSTER SLAVES</a>
4749
*/
4850
Collection<RedisClusterNode> clusterGetSlaves(RedisClusterNode master);
4951

5052
/**
5153
* Retrieve information about masters and their connected slaves.
5254
*
5355
* @return never {@literal null}.
56+
* @see <a href="https://redis.io/commands/cluster-slaves">Redis Documentation: CLUSTER SLAVES</a>
5457
*/
5558
Map<RedisClusterNode, Collection<RedisClusterNode>> clusterGetMasterSlaveMap();
5659

@@ -59,6 +62,7 @@ public interface RedisClusterCommands {
5962
*
6063
* @param key must not be {@literal null}.
6164
* @return
65+
* @see <a href="https://redis.io/commands/cluster-keyslot">Redis Documentation: CLUSTER KEYSLOT</a>
6266
*/
6367
Integer clusterGetSlotForKey(byte[] key);
6468

@@ -82,6 +86,7 @@ public interface RedisClusterCommands {
8286
* Get cluster information.
8387
*
8488
* @return
89+
* @see <a href="https://redis.io/commands/cluster-info">Redis Documentation: CLUSTER INFO</a>
8590
*/
8691
ClusterInfo clusterGetClusterInfo();
8792

@@ -90,6 +95,7 @@ public interface RedisClusterCommands {
9095
*
9196
* @param node must not be {@literal null}.
9297
* @param slots
98+
* @see <a href="https://redis.io/commands/cluster-addslots">Redis Documentation: CLUSTER ADDSLOTS</a>
9399
*/
94100
void clusterAddSlots(RedisClusterNode node, int... slots);
95101

@@ -98,6 +104,7 @@ public interface RedisClusterCommands {
98104
*
99105
* @param node must not be {@literal null}.
100106
* @param range must not be {@literal null}.
107+
* @see <a href="https://redis.io/commands/cluster-addslots">Redis Documentation: CLUSTER ADDSLOTS</a>
101108
*/
102109
void clusterAddSlots(RedisClusterNode node, SlotRange range);
103110

@@ -106,6 +113,7 @@ public interface RedisClusterCommands {
106113
*
107114
* @param slot
108115
* @return
116+
* @see <a href="https://redis.io/commands/cluster-countkeysinslot">Redis Documentation: CLUSTER COUNTKEYSINSLOT</a>
109117
*/
110118
Long clusterCountKeysInSlot(int slot);
111119

@@ -114,6 +122,7 @@ public interface RedisClusterCommands {
114122
*
115123
* @param node must not be {@literal null}.
116124
* @param slots
125+
* @see <a href="https://redis.io/commands/cluster-delslots">Redis Documentation: CLUSTER DELSLOTS</a>
117126
*/
118127
void clusterDeleteSlots(RedisClusterNode node, int... slots);
119128

@@ -122,13 +131,15 @@ public interface RedisClusterCommands {
122131
*
123132
* @param node must not be {@literal null}.
124133
* @param range must not be {@literal null}.
134+
* @see <a href="https://redis.io/commands/cluster-delslots">Redis Documentation: CLUSTER DELSLOTS</a>
125135
*/
126136
void clusterDeleteSlotsInRange(RedisClusterNode node, SlotRange range);
127137

128138
/**
129139
* Remove given {@literal node} from cluster.
130140
*
131141
* @param node must not be {@literal null}.
142+
* @see <a href="https://redis.io/commands/cluster-forget">Redis Documentation: CLUSTER FORGET</a>
132143
*/
133144
void clusterForget(RedisClusterNode node);
134145

@@ -137,13 +148,15 @@ public interface RedisClusterCommands {
137148
*
138149
* @param node must contain {@link RedisClusterNode#getHost() host} and {@link RedisClusterNode#getPort()} and must
139150
* not be {@literal null}.
151+
* @see <a href="https://redis.io/commands/cluster-meet">Redis Documentation: CLUSTER MEET</a>
140152
*/
141153
void clusterMeet(RedisClusterNode node);
142154

143155
/**
144156
* @param node must not be {@literal null}.
145157
* @param slot
146158
* @param mode must not be{@literal null}.
159+
* @see <a href="https://redis.io/commands/cluster-setslot">Redis Documentation: CLUSTER SETSLOT</a>
147160
*/
148161
void clusterSetSlot(RedisClusterNode node, int slot, AddSlots mode);
149162

@@ -153,6 +166,7 @@ public interface RedisClusterCommands {
153166
* @param slot
154167
* @param count must not be {@literal null}.
155168
* @return
169+
* @see <a href="https://redis.io/commands/cluster-getkeysinslot">Redis Documentation: CLUSTER GETKEYSINSLOT</a>
156170
*/
157171
List<byte[]> clusterGetKeysInSlot(int slot, Integer count);
158172

@@ -161,6 +175,7 @@ public interface RedisClusterCommands {
161175
*
162176
* @param master must not be {@literal null}.
163177
* @param slave must not be {@literal null}.
178+
* @see <a href="https://redis.io/commands/cluster-replicate">Redis Documentation: CLUSTER REPLICATE</a>
164179
*/
165180
void clusterReplicate(RedisClusterNode master, RedisClusterNode slave);
166181

src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2011-2014 the original author or authors.
2+
* Copyright 2011-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,34 +20,32 @@
2020
*
2121
* @author Costin Leau
2222
* @author Christoph Strobl
23+
* @author Mark Paluch
2324
*/
2425
public interface RedisConnectionCommands {
2526

2627
/**
2728
* Select the DB with given positive {@code dbIndex}.
28-
* <p>
29-
* See http://redis.io/commands/select
30-
*
31-
* @param dbIndex
29+
*
30+
* @param dbIndex the database index.
31+
* @see <a href="http://redis.io/commands/select">Redis Documentation: SELECT</a>
3232
*/
3333
void select(int dbIndex);
3434

3535
/**
3636
* Returns {@code message} via server roundtrip.
37-
* <p>
38-
* See http://redis.io/commands/echo
39-
*
40-
* @param message
37+
*
38+
* @param message the message to echo.
4139
* @return
40+
* @see <a href="http://redis.io/commands/echo">Redis Documentation: ECHO</a>
4241
*/
4342
byte[] echo(byte[] message);
4443

4544
/**
4645
* Test connection.
47-
* <p>
48-
* See http://redis.io/commands/ping
49-
*
46+
*
5047
* @return Server response message - usually {@literal PONG}.
48+
* @see <a href="http://redis.io/commands/ping">Redis Documentation: PING</a>
5149
*/
5250
String ping();
5351
}

src/main/java/org/springframework/data/redis/connection/RedisGeoCommands.java

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 the original author or authors.
2+
* Copyright 2016-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,6 +15,9 @@
1515
*/
1616
package org.springframework.data.redis.connection;
1717

18+
import lombok.Data;
19+
import lombok.RequiredArgsConstructor;
20+
1821
import java.util.LinkedHashSet;
1922
import java.util.List;
2023
import java.util.Map;
@@ -28,14 +31,12 @@
2831
import org.springframework.data.geo.Point;
2932
import org.springframework.util.Assert;
3033

31-
import lombok.Data;
32-
import lombok.RequiredArgsConstructor;
33-
3434
/**
3535
* Geo-specific Redis commands.
3636
*
3737
* @author Ninad Divadkar
3838
* @author Christoph Strobl
39+
* @author Mark Paluch
3940
* @since 1.8
4041
*/
4142
public interface RedisGeoCommands {
@@ -47,7 +48,7 @@ public interface RedisGeoCommands {
4748
* @param point must not be {@literal null}.
4849
* @param member must not be {@literal null}.
4950
* @return Number of elements added.
50-
* @see <a href="http://redis.io/commands/geoadd">http://redis.io/commands/geoadd</a>
51+
* @see <a href="http://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
5152
*/
5253
Long geoAdd(byte[] key, Point point, byte[] member);
5354

@@ -57,7 +58,7 @@ public interface RedisGeoCommands {
5758
* @param key must not be {@literal null}.
5859
* @param location must not be {@literal null}.
5960
* @return Number of elements added.
60-
* @see <a href="http://redis.io/commands/geoadd">http://redis.io/commands/geoadd</a>
61+
* @see <a href="http://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
6162
*/
6263
Long geoAdd(byte[] key, GeoLocation<byte[]> location);
6364

@@ -67,7 +68,7 @@ public interface RedisGeoCommands {
6768
* @param key must not be {@literal null}.
6869
* @param memberCoordinateMap must not be {@literal null}.
6970
* @return Number of elements added.
70-
* @see <a href="http://redis.io/commands/geoadd">http://redis.io/commands/geoadd</a>
71+
* @see <a href="http://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
7172
*/
7273
Long geoAdd(byte[] key, Map<byte[], Point> memberCoordinateMap);
7374

@@ -77,7 +78,7 @@ public interface RedisGeoCommands {
7778
* @param key must not be {@literal null}.
7879
* @param locations must not be {@literal null}.
7980
* @return Number of elements added.
80-
* @see <a href="http://redis.io/commands/geoadd">http://redis.io/commands/geoadd</a>
81+
* @see <a href="http://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
8182
*/
8283
Long geoAdd(byte[] key, Iterable<GeoLocation<byte[]>> locations);
8384

@@ -88,7 +89,7 @@ public interface RedisGeoCommands {
8889
* @param member1 must not be {@literal null}.
8990
* @param member2 must not be {@literal null}.
9091
* @return can be {@literal null}.
91-
* @see <a href="http://redis.io/commands/geodist">http://redis.io/commands/geodist</a>
92+
* @see <a href="http://redis.io/commands/geodist">Redis Documentation: GEODIST</a>
9293
*/
9394
Distance geoDist(byte[] key, byte[] member1, byte[] member2);
9495

@@ -100,7 +101,7 @@ public interface RedisGeoCommands {
100101
* @param member2 must not be {@literal null}.
101102
* @param metric must not be {@literal null}.
102103
* @return can be {@literal null}.
103-
* @see <a href="http://redis.io/commands/geodist">http://redis.io/commands/geodist</a>
104+
* @see <a href="http://redis.io/commands/geodist">Redis Documentation: GEODIST</a>
104105
*/
105106
Distance geoDist(byte[] key, byte[] member1, byte[] member2, Metric metric);
106107

@@ -110,7 +111,7 @@ public interface RedisGeoCommands {
110111
* @param key must not be {@literal null}.
111112
* @param members must not be {@literal null}.
112113
* @return never {@literal null}.
113-
* @see <a href="http://redis.io/commands/geohash">http://redis.io/commands/geohash</a>
114+
* @see <a href="http://redis.io/commands/geohash">Redis Documentation: GEOHASH</a>
114115
*/
115116
List<String> geoHash(byte[] key, byte[]... members);
116117

@@ -120,7 +121,7 @@ public interface RedisGeoCommands {
120121
* @param key must not be {@literal null}.
121122
* @param members must not be {@literal null}.
122123
* @return never {@literal null}.
123-
* @see <a href="http://redis.io/commands/geopos">http://redis.io/commands/geopos</a>
124+
* @see <a href="http://redis.io/commands/geopos">Redis Documentation: GEOPOS</a>
124125
*/
125126
List<Point> geoPos(byte[] key, byte[]... members);
126127

@@ -130,7 +131,7 @@ public interface RedisGeoCommands {
130131
* @param key must not be {@literal null}.
131132
* @param within must not be {@literal null}.
132133
* @return never {@literal null}.
133-
* @see <a href="http://redis.io/commands/georadius">http://redis.io/commands/georadius</a>
134+
* @see <a href="http://redis.io/commands/georadius">Redis Documentation: GEORADIUS</a>
134135
*/
135136
GeoResults<GeoLocation<byte[]>> geoRadius(byte[] key, Circle within);
136137

@@ -141,7 +142,7 @@ public interface RedisGeoCommands {
141142
* @param within must not be {@literal null}.
142143
* @param args must not be {@literal null}.
143144
* @return never {@literal null}.
144-
* @see <a href="http://redis.io/commands/georadius">http://redis.io/commands/georadius</a>
145+
* @see <a href="http://redis.io/commands/georadius">Redis Documentation: GEORADIUS</a>
145146
*/
146147
GeoResults<GeoLocation<byte[]>> geoRadius(byte[] key, Circle within, GeoRadiusCommandArgs args);
147148

@@ -153,7 +154,7 @@ public interface RedisGeoCommands {
153154
* @param member must not be {@literal null}.
154155
* @param radius
155156
* @return never {@literal null}.
156-
* @see <a href="http://redis.io/commands/georadiusbymember">http://redis.io/commands/georadiusbymember</a>
157+
* @see <a href="http://redis.io/commands/georadiusbymember">Redis Documentation: GEORADIUSBYMEMBER</a>
157158
*/
158159
GeoResults<GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, double radius);
159160

@@ -165,7 +166,7 @@ public interface RedisGeoCommands {
165166
* @param member must not be {@literal null}.
166167
* @param radius must not be {@literal null}.
167168
* @return never {@literal null}.
168-
* @see <a href="http://redis.io/commands/georadiusbymember">http://redis.io/commands/georadiusbymember</a>
169+
* @see <a href="http://redis.io/commands/georadiusbymember">Redis Documentation: GEORADIUSBYMEMBER</a>
169170
*/
170171
GeoResults<GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Distance radius);
171172

@@ -178,7 +179,7 @@ public interface RedisGeoCommands {
178179
* @param radius must not be {@literal null}.
179180
* @param args must not be {@literal null}.
180181
* @return never {@literal null}.
181-
* @see <a href="http://redis.io/commands/georadiusbymember">http://redis.io/commands/georadiusbymember</a>
182+
* @see <a href="http://redis.io/commands/georadiusbymember">Redis Documentation: GEORADIUSBYMEMBER</a>
182183
*/
183184
GeoResults<GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Distance radius,
184185
GeoRadiusCommandArgs args);
@@ -189,6 +190,7 @@ GeoResults<GeoLocation<byte[]>> geoRadiusByMember(byte[] key, byte[] member, Dis
189190
* @param key must not be {@literal null}.
190191
* @param members must not be {@literal null}.
191192
* @return Number of elements removed.
193+
* @see <a href="http://redis.io/commands/zrem">Redis Documentation: ZREM</a>
192194
*/
193195
Long geoRemove(byte[] key, byte[]... members);
194196

0 commit comments

Comments
 (0)