Java Code Examples for org.springframework.cloud.service.PooledServiceConnectorConfig#getPoolConfig()
The following examples show how to use
org.springframework.cloud.service.PooledServiceConnectorConfig#getPoolConfig() .
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 |
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 2
Source File: RedisLettuceClientConfigurer.java From spring-cloud-connectors with Apache License 2.0 | 5 votes |
private void configurePool(LettuceClientConfigurationBuilder clientConfiguration, PooledServiceConnectorConfig config) { if (config.getPoolConfig() != null) { GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig(); BeanWrapper target = new BeanWrapperImpl(poolConfig); BeanWrapper source = new BeanWrapperImpl(config.getPoolConfig()); Util.setCorrespondingProperties(target, source); ((LettucePoolingClientConfigurationBuilder) clientConfiguration).poolConfig(poolConfig); } }
Example 3
Source File: SpringData1RedisConnectionFactoryConfigurer.java From spring-cloud-connectors with Apache License 2.0 | 5 votes |
private void configurePool(JedisConnectionFactory connectionFactory, 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); connectionFactory.setPoolConfig(poolConfig); } }