Search in sources :

Example 1 with RedisConnectionFactoryConfig

use of org.springframework.cloud.service.keyval.RedisConnectionFactoryConfig in project spring-cloud-connectors by spring-cloud.

the class RedisConnectionFactoryConfigWithServiceConfig method pool30Wait300_timeout20.

@Bean
public RedisConnectionFactory pool30Wait300_timeout20() {
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("timeout", 20);
    PoolConfig poolConfig = new PoolConfig(30, 300);
    RedisConnectionFactoryConfig serviceConfig = new RedisConnectionFactoryConfig(poolConfig, properties);
    return connectionFactory().redisConnectionFactory("my-service", serviceConfig);
}
Also used : HashMap(java.util.HashMap) RedisConnectionFactoryConfig(org.springframework.cloud.service.keyval.RedisConnectionFactoryConfig) PoolConfig(org.springframework.cloud.service.PooledServiceConnectorConfig.PoolConfig) Bean(org.springframework.context.annotation.Bean)

Example 2 with RedisConnectionFactoryConfig

use of org.springframework.cloud.service.keyval.RedisConnectionFactoryConfig in project spring-cloud-connectors by spring-cloud.

the class RedisConnectionFactoryConfigWithServiceConfig method pool5_30Wait3000.

@Bean
public RedisConnectionFactory pool5_30Wait3000() {
    PoolConfig poolConfig = new PoolConfig(5, 30, 3000);
    PooledServiceConnectorConfig serviceConfig = new RedisConnectionFactoryConfig(poolConfig);
    return connectionFactory().redisConnectionFactory("my-service", serviceConfig);
}
Also used : RedisConnectionFactoryConfig(org.springframework.cloud.service.keyval.RedisConnectionFactoryConfig) PooledServiceConnectorConfig(org.springframework.cloud.service.PooledServiceConnectorConfig) PoolConfig(org.springframework.cloud.service.PooledServiceConnectorConfig.PoolConfig) Bean(org.springframework.context.annotation.Bean)

Example 3 with RedisConnectionFactoryConfig

use of org.springframework.cloud.service.keyval.RedisConnectionFactoryConfig in project spring-cloud-connectors by spring-cloud.

the class RedisConnectionFactoryConfigWithServiceConfig method timeout10.

@Bean
public RedisConnectionFactory timeout10() {
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put("timeout", 10);
    RedisConnectionFactoryConfig serviceConfig = new RedisConnectionFactoryConfig(properties);
    return connectionFactory().redisConnectionFactory("my-service", serviceConfig);
}
Also used : HashMap(java.util.HashMap) RedisConnectionFactoryConfig(org.springframework.cloud.service.keyval.RedisConnectionFactoryConfig) Bean(org.springframework.context.annotation.Bean)

Aggregations

RedisConnectionFactoryConfig (org.springframework.cloud.service.keyval.RedisConnectionFactoryConfig)3 Bean (org.springframework.context.annotation.Bean)3 HashMap (java.util.HashMap)2 PoolConfig (org.springframework.cloud.service.PooledServiceConnectorConfig.PoolConfig)2 PooledServiceConnectorConfig (org.springframework.cloud.service.PooledServiceConnectorConfig)1