Package org.springframework.data.redis.connection.jedis

Examples of org.springframework.data.redis.connection.jedis.JedisConnectionFactory.afterPropertiesSet()


            jedisConnectionFactory.setHostName(host);
        }
        if (port != null) {
            jedisConnectionFactory.setPort(port);
        }
        jedisConnectionFactory.afterPropertiesSet();
        connectionFactory = jedisConnectionFactory;
        return jedisConnectionFactory;
    }

    private RedisTemplate createDefaultTemplate() {
View Full Code Here


            jedisConnectionFactory.setHostName(host);
        }
        if (port != null) {
            jedisConnectionFactory.setPort(port);
        }
        jedisConnectionFactory.afterPropertiesSet();
        connectionFactory = jedisConnectionFactory;
        return jedisConnectionFactory;
    }

    private RedisTemplate createDefaultTemplate() {
View Full Code Here

            jedisConnectionFactory.setHostName(host);
        }
        if (port != null) {
            jedisConnectionFactory.setPort(port);
        }
        jedisConnectionFactory.afterPropertiesSet();
        connectionFactory = jedisConnectionFactory;
        return jedisConnectionFactory;
    }

    private RedisTemplate createDefaultTemplate() {
View Full Code Here

    JedisConnectionFactory connectionFactory = new JedisConnectionFactory();
    connectionFactory.setHostName(LOCAL_HOST);
    connectionFactory.setPort(tunnelPort);
    connectionFactory.setPassword(svc_passwd);
    connectionFactory.setUsePool(true);
    connectionFactory.afterPropertiesSet();
    RedisTemplate<String, String> redisTemplate = new RedisTemplate<String, String>();
    redisTemplate.setConnectionFactory(connectionFactory);
    redisTemplate.afterPropertiesSet();

    ValueOperations<String, String> valueOps = redisTemplate.opsForValue();
View Full Code Here

            jedisConnectionFactory.setHostName(host);
        }
        if (port != null) {
            jedisConnectionFactory.setPort(port);
        }
        jedisConnectionFactory.afterPropertiesSet();
        connectionFactory = jedisConnectionFactory;
        return jedisConnectionFactory;
    }

    private RedisTemplate createDefaultTemplate() {
View Full Code Here

  public RedisConnectionFactory redisConnectionFactory() {
    try {
      JedisConnectionFactory cf = new JedisConnectionFactory();
      cf.setHostName("localhost");
      cf.setPort(6379);
      cf.afterPropertiesSet();
      return cf;
    }
    catch (RedisConnectionFailureException e) {
      RedisConnectionFactory mockCF = mock(RedisConnectionFactory.class);
      when(mockCF.getConnection()).thenReturn(mock(RedisConnection.class));
View Full Code Here

  public RedisConnectionFactory connectionFactory() {
    try {
      JedisConnectionFactory cf = new JedisConnectionFactory();
      cf.setHostName("localhost");
      cf.setPort(6379);
      cf.afterPropertiesSet();
      return cf;
    }
    catch (RedisConnectionFailureException e) {
      RedisConnectionFactory mockCF = mock(RedisConnectionFactory.class);
      when(mockCF.getConnection()).thenReturn(mock(RedisConnection.class));
View Full Code Here

  public RedisConnectionFactory connectionFactory() {
    try {
      JedisConnectionFactory cf = new JedisConnectionFactory();
      cf.setHostName("localhost");
      cf.setPort(6379);
      cf.afterPropertiesSet();
      cf.getConnection().close();
      return cf;
    } // The following is to have setup properly finishing
    // The actual test(s) won't be executed thx to RedisAvailableRule
    catch (RedisConnectionFailureException e) {
View Full Code Here

   * {@link #resource} field with a valid resource and return normally, or throw an
   * exception.
   */
  protected JedisConnectionFactory obtainResource() throws Exception {
    JedisConnectionFactory resource = new JedisConnectionFactory();
    resource.afterPropertiesSet();
    resource.getConnection().close();
    return resource;
  }

}
View Full Code Here

  public static Collection<Object[]> testParams() {
    // Jedis
    JedisConnectionFactory jedisConnFactory = new JedisConnectionFactory();
    jedisConnFactory.setPort(SettingsUtils.getPort());
    jedisConnFactory.setHostName(SettingsUtils.getHost());
    jedisConnFactory.afterPropertiesSet();

    StringRedisTemplate templateJS = new StringRedisTemplate(jedisConnFactory);
    DefaultRedisMap mapJS = new DefaultRedisMap("bound:key:map", templateJS);
    DefaultRedisSet setJS = new DefaultRedisSet("bound:key:set", templateJS);
    RedisList list = new DefaultRedisList("bound:key:list", templateJS);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.