Skip to content

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Feb 13, 2017

Add JedisClientConfiguration and LettuceClientConfiguration to abstract client-specific features with their configuration options. Client configurations are built with a builder that create immutable instances. Client configurations replace property storage within a RedisConnectionFactory. A RedisConnectionFactory created without a client configuration uses a mutable client configuration.

Lettuce:

LettuceClientConfiguration configuration = LettuceClientConfiguration.builder()	.useSsl()	.verifyPeer()	.startTls().and()	.clientOptions(clientOptions)	.clientResources(sharedClientResources)	.timeout(Duration.ofSeconds(10))	.shutdownTimeout(Duration.ZERO)	.build(); LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(	new RedisStandaloneConfiguration(),	configuration); 

Jedis:

JedisClientConfiguration configuration = JedisClientConfiguration.builder()	.useSsl()	.hostnameVerifier(new MyHostnameVerifier())	.sslParameters(sslParameters)	.sslSocketFactory(socketFactory).and()	.clientName("my-client")	.connectTimeout(Duration.ofSeconds(10))	.readTimeout(Duration.ofSeconds(5))	.usePooling().poolConfig(poolConfig)	.build(); JedisConnectionFactory connectionFactory = new JedisConnectionFactory(	new RedisStandaloneConfiguration(),	configuration); 

Add RedisStandaloneConfiguration to be consistent with RedisSentinelConfiguration and RedisClusterConfiguration and extend environmental configuration with password and database (Standalone and Sentinel).

Remove system properties defined for surefire because they are not used and javax.net.ssl.keyStore causes exceptions when obtaining the default SSL context.


Related ticket: DATAREDIS-574.

@mp911de mp911de changed the base branch from 2.0.x to master March 30, 2017 08:30
@mp911de mp911de force-pushed the issue/DATAREDIS-574 branch 2 times, most recently from d4c74ea to 2df23fc Compare May 26, 2017 13:12
mp911de and others added 7 commits June 8, 2017 08:53
Add RedisStandaloneConfiguration. Add JedisClientConfiguration and mutable JedisClientConfiguration to encapsulate Jedis-specific client features. Extend RedisSentinelConfiguration with database index and password and RedisClusterConfiguration with password. Replace connection factory property fields with JedisClientConfiguration.
Remove gemfire hook and truststore customization. These properties are never used.
Add LettuceClientConfiguration and mutable LettuceClientConfiguration to encapsulate Lettuce-specific client features. Replace connection factory property fields with LettuceClientConfiguration.
…t and unpooled use. Allow reconfiguration to disable previously enabled SSL and pooling use.
Encapsulate Redis passwords within a GC-friendly container that allows mapping and consumption in a functional style. RedisPassword abstracts the presence and storage of a Redis password.
Updated reference Documentation, JavaDoc and minor code changes (rename methods, fix return types, diamond operators,…)
christophstrobl pushed a commit that referenced this pull request Jun 8, 2017
…s & Lettuce. We added Jedis-/LettuceClientConfiguration and mutable Jedis-/LettuceClientConfiguration to encapsulate Jedis/Lettuce specific client features. Those should be used for ConnectionFactory configuration. Additionally we added RedisStandaloneConfiguration next to the existing configurations for Sentinel and Cluster. Along the way we also removed superfluous test system properties and Gemfire specific hooks and truststore customization. Original Pull Request: #236
christophstrobl pushed a commit that referenced this pull request Jun 8, 2017
Encapsulate Redis passwords within a GC-friendly container that allows mapping and consumption in a functional style. Original Pull Request: #236
christophstrobl added a commit that referenced this pull request Jun 8, 2017
Updated reference Documentation, JavaDoc and add some minor code changes (rename methods, fix return types, diamond operators,…). Original Pull Request: #236
@christophstrobl christophstrobl deleted the issue/DATAREDIS-574 branch June 8, 2017 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants