Examples of RedisList


Examples of org.springframework.data.keyvalue.redis.support.collections.RedisList

    DefaultRedisMap mapJS = new DefaultRedisMap("bound:key:map", templateJS);

    DefaultRedisSet setJS = new DefaultRedisSet("bound:key:set", templateJS);

    RedisList list = new DefaultRedisList("bound:key:list", templateJS);

    return Arrays.asList(new Object[][] {
        { new RedisAtomicInteger("bound:key:int", jedisConnFactory), sof, templateJS },
        { new RedisAtomicLong("bound:key:long", jedisConnFactory), sof, templateJS },
        { list, sof, templateJS }, { setJS, sof, templateJS }, { mapJS, sof, templateJS } });
View Full Code Here

Examples of org.springframework.data.redis.support.collections.RedisList

    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);

    // 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

    // Lettuce
    LettuceConnectionFactory lettuceConnFactory = new LettuceConnectionFactory();
    lettuceConnFactory.setPort(SettingsUtils.getPort());
    lettuceConnFactory.setHostName(SettingsUtils.getHost());
    lettuceConnFactory.afterPropertiesSet();

    StringRedisTemplate templateLT = new StringRedisTemplate(lettuceConnFactory);
    DefaultRedisMap mapLT = new DefaultRedisMap("bound:key:mapLT", templateLT);
    DefaultRedisSet setLT = new DefaultRedisSet("bound:key:setLT", templateLT);
    RedisList listLT = new DefaultRedisList("bound:key:listLT", templateLT);

    // SRP
    SrpConnectionFactory srpConnFactory = new SrpConnectionFactory();
    srpConnFactory.setPort(SettingsUtils.getPort());
    srpConnFactory.setHostName(SettingsUtils.getHost());
    srpConnFactory.afterPropertiesSet();

    StringRedisTemplate templateSRP = new StringRedisTemplate(srpConnFactory);
    DefaultRedisMap mapSRP = new DefaultRedisMap("bound:key:mapSRP", templateSRP);
    DefaultRedisSet setSRP = new DefaultRedisSet("bound:key:setSRP", templateSRP);
    RedisList listSRP = new DefaultRedisList("bound:key:listSRP", templateSRP);

    StringObjectFactory sof = new StringObjectFactory();

    return Arrays.asList(new Object[][] {
        { new RedisAtomicInteger("bound:key:int", jedisConnFactory), sof, 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.