org.springframework.data.redis.connection.jedis.JedisClientConfiguration.JedisClientConfigurationBuilder Java Examples

The following examples show how to use org.springframework.data.redis.connection.jedis.JedisClientConfiguration.JedisClientConfigurationBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RedisJedisClientConfigurer.java    From spring-cloud-connectors with Apache License 2.0 5 votes vote down vote up
@Override
public JedisClientConfigurationBuilder configure(JedisClientConfigurationBuilder clientConfiguration, RedisConnectionFactoryConfig config) {
	if (config != null) {
		configurePool(clientConfiguration, config);
		configureClient(clientConfiguration, config);
	}
	return clientConfiguration;
}
 
Example #2
Source File: RedisJedisClientConfigurer.java    From spring-cloud-connectors with Apache License 2.0 5 votes vote down vote up
private void configurePool(JedisClientConfigurationBuilder clientConfiguration, PooledServiceConnectorConfig config) {
	if (config.getPoolConfig() != null) {
		JedisPoolConfig poolConfig = new JedisPoolConfig();
		BeanWrapper target = new BeanWrapperImpl(poolConfig);
		BeanWrapper source = new BeanWrapperImpl(config.getPoolConfig());
		Util.setCorrespondingProperties(target, source);

		clientConfiguration.usePooling().poolConfig(poolConfig);
	}
}
 
Example #3
Source File: RedisJedisClientConfigurer.java    From spring-cloud-connectors with Apache License 2.0 4 votes vote down vote up
public JedisClientConfigurationBuilder configure(JedisClientConfigurationBuilder clientConfiguration, PooledServiceConnectorConfig config) {
	if (config != null) {
		configurePool(clientConfiguration, config);
	}
	return clientConfiguration;
}
 
Example #4
Source File: RedisJedisClientConfigurer.java    From spring-cloud-connectors with Apache License 2.0 4 votes vote down vote up
private void configureClient(JedisClientConfigurationBuilder clientConfiguration, RedisConnectionFactoryConfig config) {
	if (config.getConnectionProperties() != null) {
		mapClientConfigurer.configure(clientConfiguration, config.getConnectionProperties());
	}
}