Package org.springframework.data.redis.support.collections

Examples of org.springframework.data.redis.support.collections.DefaultRedisMap$DefaultRedisMapEntry


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

    // 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();
View Full Code Here

TOP

Related Classes of org.springframework.data.redis.support.collections.DefaultRedisMap$DefaultRedisMapEntry

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.