@@ -589,7 +589,7 @@ public void setDatabase(int index) {
589
589
/**
590
590
* Returns the client name.
591
591
*
592
- * @return the client name.
592
+ * @return the client name or {@literal null} if not set .
593
593
* @since 2.1
594
594
*/
595
595
@ Nullable
@@ -598,23 +598,24 @@ public String getClientName() {
598
598
}
599
599
600
600
/**
601
- * Sets the client name used by this connection factory. Defaults to none which does not set a client name.
601
+ * Sets the client name used by this connection factory.
602
602
*
603
- * @param clientName the client name.
603
+ * @param clientName the client name. Can be {@literal null}.
604
604
* @since 2.1
605
605
* @deprecated configure the client name using {@link LettuceClientConfiguration}.
606
- * @throws IllegalStateException if {@link JedisClientConfiguration } is immutable.
606
+ * @throws IllegalStateException if {@link LettuceClientConfiguration } is immutable.
607
607
*/
608
608
@ Deprecated
609
- public void setClientName (String clientName ) {
609
+ public void setClientName (@ Nullable String clientName ) {
610
610
this .getMutableConfiguration ().setClientName (clientName );
611
611
}
612
612
613
613
/**
614
614
* Returns the password used for authenticating with the Redis server.
615
615
*
616
- * @return password for authentication.
616
+ * @return password for authentication or {@literal null} if not set .
617
617
*/
618
+ @ Nullable
618
619
public String getPassword () {
619
620
return getRedisPassword ().map (String ::new ).orElse (null );
620
621
}
@@ -916,6 +917,7 @@ private long getClientTimeout() {
916
917
* Mutable implementation of {@link LettuceClientConfiguration}.
917
918
*
918
919
* @author Mark Paluch
920
+ * @author Christoph Strobl
919
921
*/
920
922
static class MutableLettuceClientConfiguration implements LettuceClientConfiguration {
921
923
@@ -927,7 +929,8 @@ static class MutableLettuceClientConfiguration implements LettuceClientConfigura
927
929
private Duration timeout = Duration .ofSeconds (RedisURI .DEFAULT_TIMEOUT );
928
930
private Duration shutdownTimeout = Duration .ofMillis (100 );
929
931
930
- /* (non-Javadoc)
932
+ /*
933
+ * (non-Javadoc)
931
934
* @see org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration#isUseSsl()
932
935
*/
933
936
@ Override
@@ -939,7 +942,8 @@ void setUseSsl(boolean useSsl) {
939
942
this .useSsl = useSsl ;
940
943
}
941
944
942
- /* (non-Javadoc)
945
+ /*
946
+ * (non-Javadoc)
943
947
* @see org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration#isVerifyPeer()
944
948
*/
945
949
@ Override
@@ -951,7 +955,8 @@ void setVerifyPeer(boolean verifyPeer) {
951
955
this .verifyPeer = verifyPeer ;
952
956
}
953
957
954
- /* (non-Javadoc)
958
+ /*
959
+ * (non-Javadoc)
955
960
* @see org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration#isStartTls()
956
961
*/
957
962
@ Override
@@ -963,7 +968,8 @@ void setStartTls(boolean startTls) {
963
968
this .startTls = startTls ;
964
969
}
965
970
966
- /* (non-Javadoc)
971
+ /*
972
+ * (non-Javadoc)
967
973
* @see org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration#getClientResources()
968
974
*/
969
975
@ Override
@@ -975,7 +981,8 @@ void setClientResources(ClientResources clientResources) {
975
981
this .clientResources = clientResources ;
976
982
}
977
983
978
- /* (non-Javadoc)
984
+ /*
985
+ * (non-Javadoc)
979
986
* @see org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration#getClientOptions()
980
987
*/
981
988
@ Override
@@ -992,11 +999,16 @@ public Optional<String> getClientName() {
992
999
return Optional .ofNullable (clientName );
993
1000
}
994
1001
995
- void setClientName (String clientName ) {
1002
+ /**
1003
+ * @param clientName can be {@literal null}.
1004
+ * @since 2.1
1005
+ */
1006
+ void setClientName (@ Nullable String clientName ) {
996
1007
this .clientName = clientName ;
997
1008
}
998
1009
999
- /* (non-Javadoc)
1010
+ /*
1011
+ * (non-Javadoc)
1000
1012
* @see org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration#getTimeout()
1001
1013
*/
1002
1014
@ Override
@@ -1008,7 +1020,8 @@ void setTimeout(Duration timeout) {
1008
1020
this .timeout = timeout ;
1009
1021
}
1010
1022
1011
- /* (non-Javadoc)
1023
+ /*
1024
+ * (non-Javadoc)
1012
1025
* @see org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration#getShutdownTimeout()
1013
1026
*/
1014
1027
@ Override
0 commit comments