Package org.springframework.data.redis.connection.jredis

Examples of org.springframework.data.redis.connection.jredis.JredisConnectionFactory


    DefaultRedisMap mapJS = new DefaultRedisMap("bound:key:map", templateJS);
    DefaultRedisSet setJS = new DefaultRedisSet("bound:key:set", templateJS);
    RedisList list = new DefaultRedisList("bound:key:list", templateJS);

    // JRedis
    JredisConnectionFactory jredisConnFactory = new JredisConnectionFactory();
    jredisConnFactory.setPort(SettingsUtils.getPort());
    jredisConnFactory.setHostName(SettingsUtils.getHost());
    jredisConnFactory.afterPropertiesSet();

    StringRedisTemplate templateJR = new StringRedisTemplate(jredisConnFactory);
    DefaultRedisMap mapJR = new DefaultRedisMap("bound:key:mapJR", templateJR);
    // Skip list and set. Rename in Collections uses Redis tx, not supported by JRedis
View Full Code Here


    jedisConnFactory.setHostName(SettingsUtils.getHost());
    jedisConnFactory.setUsePool(true);
    jedisConnFactory.afterPropertiesSet();

    // JRedis
    JredisConnectionFactory jredisConnFactory = new JredisConnectionFactory(new JredisPool(SettingsUtils.getHost(),
        SettingsUtils.getPort()));
    jredisConnFactory.afterPropertiesSet();

    // Lettuce
    LettuceConnectionFactory lettuceConnFactory = new LettuceConnectionFactory();
    lettuceConnFactory.setPort(SettingsUtils.getPort());
    lettuceConnFactory.setHostName(SettingsUtils.getHost());
View Full Code Here

    jackson2JsonPersonTemplate.setHashKeySerializer(jackson2JsonSerializer);
    jackson2JsonPersonTemplate.setHashValueSerializer(jackson2JsonStringSerializer);
    jackson2JsonPersonTemplate.afterPropertiesSet();

    // JRedis
    JredisConnectionFactory jredisConnFactory = new JredisConnectionFactory(new JredisPool(SettingsUtils.getHost(),
        SettingsUtils.getPort()));
    jredisConnFactory.afterPropertiesSet();

    RedisTemplate<String, String> genericTemplateJR = new StringRedisTemplate(jredisConnFactory);
    RedisTemplate<String, Person> xGenericTemplateJR = new RedisTemplate<String, Person>();
    xGenericTemplateJR.setConnectionFactory(jredisConnFactory);
    xGenericTemplateJR.setDefaultSerializer(serializer);
View Full Code Here

    rawTemplate.setEnableDefaultSerializer(false);
    rawTemplate.setKeySerializer(stringSerializer);
    rawTemplate.afterPropertiesSet();

    // jredis
    JredisConnectionFactory jredisConnFactory = new JredisConnectionFactory(new JredisPool(SettingsUtils.getHost(),
        SettingsUtils.getPort()));
    jredisConnFactory.afterPropertiesSet();

    RedisTemplate<String, String> stringTemplateJR = new StringRedisTemplate(jredisConnFactory);
    RedisTemplate<String, Person> personTemplateJR = new RedisTemplate<String, Person>();
    personTemplateJR.setConnectionFactory(jredisConnFactory);
    personTemplateJR.afterPropertiesSet();
View Full Code Here

    rawTemplate.setConnectionFactory(jedisConnFactory);
    rawTemplate.setKeySerializer(stringSerializer);
    rawTemplate.afterPropertiesSet();

    // JRedis
    JredisConnectionFactory jredisConnFactory = new JredisConnectionFactory(new JredisPool(SettingsUtils.getHost(),
        SettingsUtils.getPort(), defaultPoolConfig));
    jredisConnFactory.afterPropertiesSet();

    RedisTemplate genericTemplateJR = new RedisTemplate();
    genericTemplateJR.setConnectionFactory(jredisConnFactory);
    genericTemplateJR.afterPropertiesSet();
View Full Code Here

    assumeTrue(RedisTestProfileValueSource.matches("runLongTests", "true"));
    final K key1 = keyFactory.instance();
    V value1 = valueFactory.instance();
    assumeTrue(key1 instanceof String && value1 instanceof String);
    // JRedis does not support pExpire
    JredisConnectionFactory factory = new JredisConnectionFactory();
    factory.setHostName(SettingsUtils.getHost());
    factory.setPort(SettingsUtils.getPort());
    factory.afterPropertiesSet();
    final StringRedisTemplate template2 = new StringRedisTemplate(factory);
    template2.boundValueOps((String) key1).set((String) value1);
    template2.expire((String) key1, 10, TimeUnit.MILLISECONDS);
    Thread.sleep(15);
    // 10 millis should get rounded up to 1 sec if pExpire not supported
View Full Code Here

    srpConnFactory.setPort(port);
    srpConnFactory.setHostName(host);
    srpConnFactory.afterPropertiesSet();

    // JRedis
    JredisConnectionFactory jRedisConnectionFactory = new JredisConnectionFactory();
    jRedisConnectionFactory.setPort(port);
    jRedisConnectionFactory.setHostName(host);
    jRedisConnectionFactory.setDatabase(2);
    jRedisConnectionFactory.afterPropertiesSet();

    return Arrays.asList(new Object[][] { { jedisConnFactory }, { lettuceConnFactory }, { srpConnFactory },
        { jRedisConnectionFactory } });
  }
View Full Code Here

    srpConnFactory.setPort(port);
    srpConnFactory.setHostName(host);
    srpConnFactory.afterPropertiesSet();

    // JRedis
    JredisConnectionFactory jRedisConnectionFactory = new JredisConnectionFactory();
    jRedisConnectionFactory.setPort(port);
    jRedisConnectionFactory.setHostName(host);
    jRedisConnectionFactory.setDatabase(2);
    jRedisConnectionFactory.afterPropertiesSet();

    return Arrays.asList(new Object[][] { { jedisConnFactory }, { lettuceConnFactory }, { srpConnFactory },
        { jRedisConnectionFactory } });
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.redis.connection.jredis.JredisConnectionFactory

Copyright © 2018 www.massapicom. 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.