Skip to content

Commit d099166

Browse files
authored
Merge branch 'master' into search-warning-message
2 parents ea7b962 + 251831c commit d099166

36 files changed

+2407
-33
lines changed

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<slf4j.version>1.7.36</slf4j.version>
5151
<resilience4j.version>1.7.1</resilience4j.version>
5252
<jackson.version>2.17.2</jackson.version>
53-
<maven.surefire.version>3.3.1</maven.surefire.version>
53+
<maven.surefire.version>3.5.0</maven.surefire.version>
5454
</properties>
5555

5656
<dependencies>
@@ -87,7 +87,7 @@
8787
<dependency>
8888
<groupId>org.locationtech.jts</groupId>
8989
<artifactId>jts-core</artifactId>
90-
<version>1.19.0</version>
90+
<version>1.20.0</version>
9191
<scope>test</scope>
9292
</dependency>
9393
<!-- test -->
@@ -136,7 +136,7 @@
136136
<dependency>
137137
<groupId>org.apache.httpcomponents.client5</groupId>
138138
<artifactId>httpclient5-fluent</artifactId>
139-
<version>5.3.1</version>
139+
<version>5.4</version>
140140
<scope>test</scope>
141141
</dependency>
142142

@@ -237,7 +237,7 @@
237237
</plugin>
238238
<plugin>
239239
<artifactId>maven-javadoc-plugin</artifactId>
240-
<version>3.8.0</version>
240+
<version>3.10.0</version>
241241
<configuration>
242242
<source>8</source><!-- Until JDK 11+ -->
243243
<detectJavaApiLink>false</detectJavaApiLink><!-- Until JDK 11+ -->
@@ -312,7 +312,7 @@
312312
<!--Sign the components - this is required by maven central for releases -->
313313
<plugin>
314314
<artifactId>maven-gpg-plugin</artifactId>
315-
<version>3.2.5</version>
315+
<version>3.2.6</version>
316316
<configuration>
317317
<gpgArguments>
318318
<arg>--pinentry-mode</arg>

src/main/java/redis/clients/jedis/CommandObjects.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4414,26 +4414,31 @@ public final CommandObject<Map<String, Object>> graphConfigGet(String configName
44144414
// RedisGraph commands
44154415

44164416
// RedisGears commands
4417+
@Deprecated
44174418
public final CommandObject<String> tFunctionLoad(String libraryCode, TFunctionLoadParams params) {
44184419
return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.LOAD)
44194420
.addParams(params).add(libraryCode), BuilderFactory.STRING);
44204421
}
44214422

4423+
@Deprecated
44224424
public final CommandObject<String> tFunctionDelete(String libraryName) {
44234425
return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.DELETE)
44244426
.add(libraryName), BuilderFactory.STRING);
44254427
}
44264428

4429+
@Deprecated
44274430
public final CommandObject<List<GearsLibraryInfo>> tFunctionList(TFunctionListParams params) {
44284431
return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.LIST)
44294432
.addParams(params), GearsLibraryInfo.GEARS_LIBRARY_INFO_LIST);
44304433
}
44314434

4435+
@Deprecated
44324436
public final CommandObject<Object> tFunctionCall(String library, String function, List<String> keys, List<String> args) {
44334437
return new CommandObject<>(commandArguments(GearsCommand.TFCALL).add(library + "." + function)
44344438
.add(keys.size()).keys(keys).addObjects(args), BuilderFactory.AGGRESSIVE_ENCODED_OBJECT);
44354439
}
44364440

4441+
@Deprecated
44374442
public final CommandObject<Object> tFunctionCallAsync(String library, String function, List<String> keys, List<String> args) {
44384443
return new CommandObject<>(commandArguments(GearsCommand.TFCALLASYNC).add(library + "." + function)
44394444
.add(keys.size()).keys(keys).addObjects(args), BuilderFactory.AGGRESSIVE_ENCODED_OBJECT);

src/main/java/redis/clients/jedis/JedisCluster.java

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,38 @@ public class JedisCluster extends UnifiedJedis {
1919
* Default timeout in milliseconds.
2020
*/
2121
public static final int DEFAULT_TIMEOUT = 2000;
22+
23+
/**
24+
* Default amount of attempts for executing a command
25+
*/
2226
public static final int DEFAULT_MAX_ATTEMPTS = 5;
2327

28+
/**
29+
* Creates a JedisCluster instance. The provided node is used to make the first contact with the cluster.<br>
30+
* Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts.
31+
* @param node Node to first connect to.
32+
*/
2433
public JedisCluster(HostAndPort node) {
2534
this(Collections.singleton(node));
2635
}
2736

37+
/**
38+
* Creates a JedisCluster instance. The provided node is used to make the first contact with the cluster.<br>
39+
* Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts.
40+
* @param node Node to first connect to.
41+
* @param timeout connection and socket timeout in milliseconds.
42+
*/
2843
public JedisCluster(HostAndPort node, int timeout) {
2944
this(Collections.singleton(node), timeout);
3045
}
3146

47+
/**
48+
* Creates a JedisCluster instance. The provided node is used to make the first contact with the cluster.<br>
49+
* You can specify the timeout and the maximum attempts.
50+
* @param node Node to first connect to.
51+
* @param timeout connection and socket timeout in milliseconds.
52+
* @param maxAttempts maximum attempts for executing a command.
53+
*/
3254
public JedisCluster(HostAndPort node, int timeout, int maxAttempts) {
3355
this(Collections.singleton(node), timeout, maxAttempts);
3456
}
@@ -89,14 +111,32 @@ public JedisCluster(HostAndPort node, final JedisClientConfig clientConfig, int
89111
this(Collections.singleton(node), clientConfig, maxAttempts, poolConfig);
90112
}
91113

114+
/**
115+
* Creates a JedisCluster with multiple entry points.
116+
* Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts.
117+
* @param nodes Nodes to connect to.
118+
*/
92119
public JedisCluster(Set<HostAndPort> nodes) {
93120
this(nodes, DEFAULT_TIMEOUT);
94121
}
95122

123+
/**
124+
* Creates a JedisCluster with multiple entry points.
125+
* Here, the default timeout of {@value JedisCluster#DEFAULT_TIMEOUT} ms is being used with {@value JedisCluster#DEFAULT_MAX_ATTEMPTS} maximum attempts.
126+
* @param nodes Nodes to connect to.
127+
* @param timeout connection and socket timeout in milliseconds.
128+
*/
96129
public JedisCluster(Set<HostAndPort> nodes, int timeout) {
97130
this(nodes, DefaultJedisClientConfig.builder().timeoutMillis(timeout).build());
98131
}
99132

133+
/**
134+
* Creates a JedisCluster with multiple entry points.<br>
135+
* You can specify the timeout and the maximum attempts.
136+
* @param nodes Nodes to connect to.
137+
* @param timeout connection and socket timeout in milliseconds.
138+
* @param maxAttempts maximum attempts for executing a command.
139+
*/
100140
public JedisCluster(Set<HostAndPort> nodes, int timeout, int maxAttempts) {
101141
this(nodes, DefaultJedisClientConfig.builder().timeoutMillis(timeout).build(), maxAttempts);
102142
}
@@ -182,6 +222,19 @@ public JedisCluster(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfi
182222
Duration.ofMillis((long) clientConfig.getSocketTimeoutMillis() * maxAttempts));
183223
}
184224

225+
/**
226+
* Creates a JedisCluster with multiple entry points.<br>
227+
* You can specify the timeout and the maximum attempts.<br>
228+
*
229+
* Additionally, you are free to provide a {@link JedisClientConfig} instance.<br>
230+
* You can use the {@link DefaultJedisClientConfig#builder()} builder pattern to customize your configuration, including socket timeouts,
231+
* username and passwords as well as SSL related parameters.
232+
*
233+
* @param clusterNodes Nodes to connect to.
234+
* @param clientConfig Client configuration parameters.
235+
* @param maxAttempts maximum attempts for executing a command.
236+
* @param maxTotalRetriesDuration Maximum time used for reconnecting.
237+
*/
185238
public JedisCluster(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, int maxAttempts,
186239
Duration maxTotalRetriesDuration) {
187240
this(new ClusterConnectionProvider(clusterNodes, clientConfig), maxAttempts, maxTotalRetriesDuration,
@@ -213,8 +266,7 @@ public JedisCluster(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfi
213266
}
214267

215268
// Uses a fetched connection to process protocol. Should be avoided if possible.
216-
public JedisCluster(ClusterConnectionProvider provider, int maxAttempts,
217-
Duration maxTotalRetriesDuration) {
269+
public JedisCluster(ClusterConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) {
218270
super(provider, maxAttempts, maxTotalRetriesDuration);
219271
}
220272

@@ -223,10 +275,20 @@ private JedisCluster(ClusterConnectionProvider provider, int maxAttempts, Durati
223275
super(provider, maxAttempts, maxTotalRetriesDuration, protocol);
224276
}
225277

278+
/**
279+
* Returns all nodes that were configured to connect to in key-value pairs ({@link Map}).<br>
280+
* Key is the HOST:PORT and the value is the connection pool.
281+
* @return the map of all connections.
282+
*/
226283
public Map<String, ConnectionPool> getClusterNodes() {
227284
return ((ClusterConnectionProvider) provider).getNodes();
228285
}
229286

287+
/**
288+
* Returns the connection for one of the 16,384 slots.
289+
* @param slot the slot to retrieve the connection for.
290+
* @return connection of the provided slot. {@code close()} of this connection must be called after use.
291+
*/
230292
public Connection getConnectionFromSlot(int slot) {
231293
return ((ClusterConnectionProvider) provider).getConnectionFromSlot(slot);
232294
}

src/main/java/redis/clients/jedis/UnifiedJedis.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4984,26 +4984,31 @@ public Map<String, Object> graphConfigGet(String configName) {
49844984
// RedisGraph commands
49854985

49864986
// RedisGears commands
4987+
@Deprecated
49874988
@Override
49884989
public String tFunctionLoad(String libraryCode, TFunctionLoadParams params) {
49894990
return executeCommand(commandObjects.tFunctionLoad(libraryCode, params));
49904991
}
49914992

4993+
@Deprecated
49924994
@Override
49934995
public String tFunctionDelete(String libraryName) {
49944996
return executeCommand(commandObjects.tFunctionDelete(libraryName));
49954997
}
49964998

4999+
@Deprecated
49975000
@Override
49985001
public List<GearsLibraryInfo> tFunctionList(TFunctionListParams params) {
49995002
return executeCommand(commandObjects.tFunctionList(params));
50005003
}
50015004

5005+
@Deprecated
50025006
@Override
50035007
public Object tFunctionCall(String library, String function, List<String> keys, List<String> args) {
50045008
return executeCommand(commandObjects.tFunctionCall(library, function, keys, args));
50055009
}
50065010

5011+
@Deprecated
50075012
@Override
50085013
public Object tFunctionCallAsync(String library, String function, List<String> keys, List<String> args) {
50095014
return executeCommand(commandObjects.tFunctionCallAsync(library, function, keys, args));

src/main/java/redis/clients/jedis/gears/RedisGearsCommands.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@
44

55
import java.util.List;
66

7+
@Deprecated
78
public interface RedisGearsCommands {
89

9-
default String tFunctionLoad(String libraryCode) {
10+
@Deprecated default String tFunctionLoad(String libraryCode) {
1011
return tFunctionLoad(libraryCode, TFunctionLoadParams.loadParams());
1112
}
1213

13-
String tFunctionLoad(String libraryCode, TFunctionLoadParams params);
14+
@Deprecated String tFunctionLoad(String libraryCode, TFunctionLoadParams params);
1415

15-
default List<GearsLibraryInfo> tFunctionList() {
16+
@Deprecated default List<GearsLibraryInfo> tFunctionList() {
1617
return tFunctionList(TFunctionListParams.listParams());
1718
}
1819

19-
List<GearsLibraryInfo> tFunctionList(TFunctionListParams params);
20+
@Deprecated List<GearsLibraryInfo> tFunctionList(TFunctionListParams params);
2021

21-
String tFunctionDelete(String libraryName);
22+
@Deprecated String tFunctionDelete(String libraryName);
2223

23-
Object tFunctionCall(String library, String function, List<String> keys, List<String> args);
24+
@Deprecated Object tFunctionCall(String library, String function, List<String> keys, List<String> args);
2425

25-
Object tFunctionCallAsync(String library, String function, List<String> keys, List<String> args);
26+
@Deprecated Object tFunctionCallAsync(String library, String function, List<String> keys, List<String> args);
2627
}

src/main/java/redis/clients/jedis/gears/RedisGearsProtocol.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
import redis.clients.jedis.commands.ProtocolCommand;
55
import redis.clients.jedis.util.SafeEncoder;
66

7+
@Deprecated
78
public class RedisGearsProtocol {
89

10+
@Deprecated
911
public enum GearsCommand implements ProtocolCommand {
1012

11-
TFUNCTION,
12-
TFCALL,
13-
TFCALLASYNC;
13+
@Deprecated TFUNCTION,
14+
@Deprecated TFCALL,
15+
@Deprecated TFCALLASYNC;
1416

1517
private final byte[] raw;
1618

@@ -24,6 +26,7 @@ public byte[] getRaw() {
2426
}
2527
}
2628

29+
@Deprecated
2730
public enum GearsKeyword implements Rawable {
2831

2932
CONFIG,

src/main/java/redis/clients/jedis/gears/TFunctionListParams.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import java.util.Collections;
88

9+
@Deprecated
910
public class TFunctionListParams implements IParams {
1011
private boolean withCode = false;
1112
private int verbose;

src/main/java/redis/clients/jedis/gears/TFunctionLoadParams.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import redis.clients.jedis.gears.RedisGearsProtocol.GearsKeyword;
55
import redis.clients.jedis.params.IParams;
66

7+
@Deprecated
78
public class TFunctionLoadParams implements IParams {
89
private boolean replace = false;
910
private String config;

src/main/java/redis/clients/jedis/gears/resps/FunctionInfo.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import static redis.clients.jedis.BuilderFactory.*;
1212

13+
@Deprecated
1314
public class FunctionInfo {
1415
private final String name;
1516
private final String description;
@@ -40,6 +41,7 @@ public FunctionInfo(String name, String description, boolean isAsync, List<Strin
4041
this.flags = flags;
4142
}
4243

44+
@Deprecated
4345
public static final Builder<List<FunctionInfo>> FUNCTION_INFO_LIST = new Builder<List<FunctionInfo>>() {
4446
@Override
4547
public List<FunctionInfo> build(Object data) {

src/main/java/redis/clients/jedis/gears/resps/FunctionStreamInfo.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.util.List;
77
import java.util.stream.Collectors;
88

9+
@Deprecated
910
public class FunctionStreamInfo {
1011
private final String name;
1112
private final String idToReadFrom;
@@ -67,6 +68,7 @@ public FunctionStreamInfo(String name, String idToReadFrom, String lastError,
6768
this.pendingIds = pendingIds;
6869
}
6970

71+
@Deprecated
7072
public static final Builder<List<FunctionStreamInfo>> STREAM_INFO_LIST = new Builder<List<FunctionStreamInfo>>() {
7173
@Override
7274
public List<FunctionStreamInfo> build(Object data) {

0 commit comments

Comments
 (0)