File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
wrapper/src/main/java/software/amazon/jdbc/plugin/cache Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,18 @@ public class CacheConnection {
5151 null ,
5252 "The cache read-only server endpoint address." );
5353
54+ protected static final AwsWrapperProperty CACHE_USE_SSL =
55+ new AwsWrapperProperty (
56+ "cacheUseSSL" ,
57+ "true" ,
58+ "Whether to use SSL for cache connections." );
59+
60+ private final boolean useSSL ;
61+
5462 public CacheConnection (final Properties properties ) {
5563 this .cacheRwServerAddr = CACHE_RW_ENDPOINT_ADDR .getString (properties );
5664 this .cacheRoServerAddr = CACHE_RO_ENDPOINT_ADDR .getString (properties );
65+ this .useSSL = Boolean .parseBoolean (CACHE_USE_SSL .getString (properties ));
5766 }
5867
5968 /* Here we check if we need to initialise connection pool for read or write to cache.
@@ -96,7 +105,7 @@ private void createConnectionPool(boolean isRead) {
96105 String [] hostnameAndPort = serverAddr .split (":" );
97106 RedisURI redisUriCluster = RedisURI .Builder .redis (hostnameAndPort [0 ])
98107 .withPort (Integer .parseInt (hostnameAndPort [1 ]))
99- .withSsl (true ).withVerifyPeer (false ).build ();
108+ .withSsl (useSSL ).withVerifyPeer (false ).build ();
100109
101110 RedisClient client = RedisClient .create (resources , redisUriCluster );
102111 GenericObjectPool <StatefulRedisConnection <byte [], byte []>> pool =
You can’t perform that action at this time.
0 commit comments