42
42
43
43
import org .apache .commons .logging .Log ;
44
44
import org .apache .commons .logging .LogFactory ;
45
-
46
45
import org .springframework .beans .factory .DisposableBean ;
47
46
import org .springframework .beans .factory .InitializingBean ;
48
47
import org .springframework .dao .DataAccessException ;
@@ -380,10 +379,12 @@ public RedisClusterConnection getClusterConnection() {
380
379
* @param timeout command timeout in {@link TimeUnit#MILLISECONDS}.
381
380
* @param database database index to operate on.
382
381
* @return the {@link LettuceConnection}.
382
+ * @throws IllegalArgumentException if a required parameter is {@literal null}.
383
383
* @since 2.2
384
384
*/
385
- protected LettuceConnection doCreateLettuceConnection (StatefulRedisConnection <byte [], byte []> sharedConnection ,
386
- LettuceConnectionProvider connectionProvider , long timeout , int database ) {
385
+ protected LettuceConnection doCreateLettuceConnection (
386
+ @ Nullable StatefulRedisConnection <byte [], byte []> sharedConnection , LettuceConnectionProvider connectionProvider ,
387
+ long timeout , int database ) {
387
388
388
389
return new LettuceConnection (sharedConnection , connectionProvider , timeout , database );
389
390
}
@@ -398,12 +399,13 @@ protected LettuceConnection doCreateLettuceConnection(StatefulRedisConnection<by
398
399
* @param clusterCommandExecutor the {@link ClusterCommandExecutor} to release connections.
399
400
* @param commandTimeout command timeout {@link Duration}.
400
401
* @return the {@link LettuceConnection}.
402
+ * @throws IllegalArgumentException if a required parameter is {@literal null}.
401
403
* @since 2.2
402
404
*/
403
405
protected LettuceClusterConnection doCreateLettuceClusterConnection (
404
- StatefulRedisClusterConnection <byte [], byte []> sharedConnection , LettuceConnectionProvider connectionProvider ,
405
- ClusterTopologyProvider topologyProvider , ClusterCommandExecutor clusterCommandExecutor ,
406
- Duration commandTimeout ) {
406
+ @ Nullable StatefulRedisClusterConnection <byte [], byte []> sharedConnection ,
407
+ LettuceConnectionProvider connectionProvider , ClusterTopologyProvider topologyProvider ,
408
+ ClusterCommandExecutor clusterCommandExecutor , Duration commandTimeout ) {
407
409
408
410
return new LettuceClusterConnection (sharedConnection , connectionProvider , topologyProvider , clusterCommandExecutor ,
409
411
commandTimeout );
0 commit comments