Example usage for org.springframework.data.redis.connection.jedis JedisConnectionFactory JedisConnectionFactory

List of usage examples for org.springframework.data.redis.connection.jedis JedisConnectionFactory JedisConnectionFactory

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection.jedis JedisConnectionFactory JedisConnectionFactory.

Prototype

public JedisConnectionFactory() 

Source Link

Document

Constructs a new JedisConnectionFactory instance with default settings (default connection pooling, no shard information).

Usage

From source file:sample.config.session.HttpSessionConfig.java

@Bean
public JedisConnectionFactory connectionFactory() {
    return new JedisConnectionFactory(); // <2>
}

From source file:example.springdata.redis.repositories.ApplicationConfiguration.java

@Bean
RedisConnectionFactory connectionFactory() {
    return new JedisConnectionFactory();
}

From source file:edu.kit.scc.ServiceConfiguration.java

@Bean
JedisConnectionFactory jedisConnectionFactory() {
    JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory();
    jedisConnectionFactory.setPort(port);
    return jedisConnectionFactory;
}

From source file:com.enitalk.configs.RedisConfig.java

@Bean
public JedisConnectionFactory jedisConnectionFactory() {
    JedisConnectionFactory j = new JedisConnectionFactory();
    j.setUsePool(true);/*w w  w.j  a v  a  2 s  . c om*/
    String redisHost = env.getProperty("redis.host", "localhost");
    logger.info("Redis env host {}", redisHost);
    j.setHostName(redisHost);
    if (StringUtils.isNotBlank(env.getProperty("redis.pass"))) {
        j.setPassword(env.getProperty("redis.pass"));
    }
    return j;
}

From source file:sample.config.DataSourceConfig.java

@Bean
public JedisConnectionFactory connectionFactory() {
    return new JedisConnectionFactory();
}

From source file:com.scheible.risingempire.web.config.session.RedisConfig.java

@Bean
public JedisConnectionFactory connectionFactory(RedisConnectionProperties conn) throws Exception {
    JedisConnectionFactory factory = new JedisConnectionFactory();
    factory.setPort(conn.getPort());/*  w  ww  .j  a  v  a2s.co  m*/
    return factory;
}

From source file:internal.diff.common.configuration.RedisConfiguration.java

@Bean
public RedisConnectionFactory redisConnectionFactory() {

    JedisConnectionFactory connectionFactory = new JedisConnectionFactory();

    connectionFactory.setHostName(this.redisHost);

    return connectionFactory;
}

From source file:com.coffeebeans.services.config.caching.RedisCachingConfig.java

@Bean
JedisConnectionFactory jedisConnectionFactory() {
    JedisConnectionFactory factory = new JedisConnectionFactory();
    factory.setHostName(System.getProperty(Constants.REDIS_HOST_NAME, Constants.LOCALHOST));
    factory.setPort(Integer.parseInt(System.getProperty(Constants.REDIS_PORT)));
    factory.setUsePool(true);/*from   w ww  .  j av  a2s  .com*/
    return factory;
}

From source file:com.springsource.html5expense.config.LocalJedisConnectionFactoryConfiguration.java

@Override
@Bean//  w ww  .j ava2s  .co m
public RedisConnectionFactory redisConnectionFactory() throws Exception {
    JedisConnectionFactory factory = new JedisConnectionFactory();
    factory.setHostName(propertyResolver.getProperty("redis.host"));
    factory.setPort(Integer.parseInt(propertyResolver.getProperty("redis.port")));
    factory.setPassword(propertyResolver.getProperty("redis.pass"));
    return factory;
}

From source file:org.encos.flydown.limiters.cache.impl.RedisRatingCache.java

@SuppressWarnings("unchecked")
public RedisRatingCache(String ip, int port) {
    JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory();
    jedisConnectionFactory.setHostName(ip);
    jedisConnectionFactory.setPort(port);

    //todo to be defined properly

    cacheTemplate = new RedisTemplate();
    cacheTemplate.setConnectionFactory(jedisConnectionFactory);

}