use of org.springframework.data.redis.connection.jedis.JedisConnectionFactory in project spring-boot by spring-projects.
the class RedisTestServer method createConnectionFactory.
private JedisConnectionFactory createConnectionFactory() {
JedisConnectionFactory connectionFactory = new JedisConnectionFactory();
connectionFactory.afterPropertiesSet();
testConnection(connectionFactory);
return connectionFactory;
}
use of org.springframework.data.redis.connection.jedis.JedisConnectionFactory in project spring-cloud-connectors by spring-cloud.
the class RedisConnectionFactoryCloudConfigTestHelper method assertConnectionProperties.
public static void assertConnectionProperties(RedisConnectionFactory connector, int timeout) {
JedisConnectionFactory jedisConnector = (JedisConnectionFactory) connector;
assertEquals(timeout, jedisConnector.getTimeout());
}
use of org.springframework.data.redis.connection.jedis.JedisConnectionFactory in project spring-security-oauth by spring-projects.
the class RedisTokenStorePrefixTests method setup.
@Before
public void setup() throws Exception {
JedisShardInfo shardInfo = new JedisShardInfo("localhost");
JedisConnectionFactory connectionFactory = new JedisConnectionFactory(shardInfo);
tokenStore = new RedisTokenStore(connectionFactory);
tokenStore.setPrefix("spring:oauth2:");
}
use of org.springframework.data.redis.connection.jedis.JedisConnectionFactory in project spring-security-oauth by spring-projects.
the class RedisTokenStoreTests method setup.
@Before
public void setup() throws Exception {
JedisShardInfo shardInfo = new JedisShardInfo("localhost");
JedisConnectionFactory connectionFactory = new JedisConnectionFactory(shardInfo);
tokenStore = new RedisTokenStore(connectionFactory);
}
use of org.springframework.data.redis.connection.jedis.JedisConnectionFactory in project cas by apereo.
the class RedisTicketRegistryConfiguration method redisConnectionFactory.
@Bean
@RefreshScope
public RedisConnectionFactory redisConnectionFactory() {
final RedisTicketRegistryProperties redis = casProperties.getTicket().getRegistry().getRedis();
final JedisPoolConfig poolConfig = redis.getPool() != null ? jedisPoolConfig() : new JedisPoolConfig();
final JedisConnectionFactory factory = new JedisConnectionFactory(poolConfig);
factory.setHostName(redis.getHost());
factory.setPort(redis.getPort());
if (redis.getPassword() != null) {
factory.setPassword(redis.getPassword());
}
factory.setDatabase(redis.getDatabase());
if (redis.getTimeout() > 0) {
factory.setTimeout(redis.getTimeout());
}
return factory;
}
Aggregations