Package org.springframework.data.redis.connection.srp

Examples of org.springframework.data.redis.connection.srp.SrpConnectionFactory


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


    lettuceConnFactory.setPort(SettingsUtils.getPort());
    lettuceConnFactory.setHostName(SettingsUtils.getHost());
    lettuceConnFactory.afterPropertiesSet();

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

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

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

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

    RedisTemplate<String, String> stringTemplateSRP = new StringRedisTemplate(srConnFactory);
    RedisTemplate<String, Person> personTemplateSRP = new RedisTemplate<String, Person>();
    personTemplateSRP.setConnectionFactory(srConnFactory);
    personTemplateSRP.afterPropertiesSet();
View Full Code Here

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

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

    RedisTemplate<String, String> genericTemplateSrp = new StringRedisTemplate(srpConnFactory);
    RedisTemplate<String, Person> xGenericTemplateSrp = new RedisTemplate<String, Person>();
    xGenericTemplateSrp.setConnectionFactory(srpConnFactory);
    xGenericTemplateSrp.setDefaultSerializer(serializer);
View Full Code Here

    rawTemplateLtc.setConnectionFactory(lettuceConnFactory);
    rawTemplateLtc.setKeySerializer(stringSerializer);
    rawTemplateLtc.afterPropertiesSet();

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

    RedisTemplate genericTemplateSrp = new RedisTemplate();
    genericTemplateSrp.setConnectionFactory(srpConnFactory);
    genericTemplateSrp.afterPropertiesSet();
View Full Code Here

    LettuceConnectionFactory lettuce = new LettuceConnectionFactory();
    lettuce.setPort(6379);
    lettuce.afterPropertiesSet();

    SrpConnectionFactory srp = new SrpConnectionFactory();
    srp.setPort(6479);
    srp.afterPropertiesSet();

    return Arrays.asList(new Object[][] { { jedis }, { lettuce }, { srp } });
  }
View Full Code Here

        isEqual(Arrays.asList(new Object[] { 5l, 1L, 1l, list, 1l, longSet, true, tupleSet, zSet, true, map })));
  }

  @Test
  public void testExecConversionDisabled() {
    SrpConnectionFactory factory2 = new SrpConnectionFactory(SettingsUtils.getHost(), SettingsUtils.getPort());
    factory2.setConvertPipelineAndTxResults(false);
    factory2.afterPropertiesSet();
    StringRedisTemplate template = new StringRedisTemplate(factory2);
    template.afterPropertiesSet();
    List<Object> results = template.execute(new SessionCallback<List<Object>>() {
      @SuppressWarnings({ "rawtypes", "unchecked" })
      public List<Object> execute(RedisOperations operations) throws DataAccessException {
View Full Code Here

    lettuceConnFactory.setDatabase(2);
    lettuceConnFactory.setValidateConnection(true);
    lettuceConnFactory.afterPropertiesSet();

    // SRP
    SrpConnectionFactory srpConnFactory = new SrpConnectionFactory();
    srpConnFactory.setPort(port);
    srpConnFactory.setHostName(host);
    srpConnFactory.afterPropertiesSet();

    // JRedis
    JredisConnectionFactory jRedisConnectionFactory = new JredisConnectionFactory();
    jRedisConnectionFactory.setPort(port);
    jRedisConnectionFactory.setHostName(host);
View Full Code Here

    rawTemplateLtc.setEnableDefaultSerializer(false);
    rawTemplateLtc.setConnectionFactory(lettuceConnFactory);
    rawTemplateLtc.afterPropertiesSet();

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

    RedisTemplate<String, String> stringTemplateSrp = new StringRedisTemplate(srpConnFactory);
    RedisTemplate<String, Person> personTemplateSrp = new RedisTemplate<String, Person>();
    personTemplateSrp.setConnectionFactory(srpConnFactory);
    personTemplateSrp.afterPropertiesSet();
View Full Code Here

    lettuceConnFactory.setDatabase(2);
    lettuceConnFactory.setValidateConnection(true);
    lettuceConnFactory.afterPropertiesSet();

    // SRP
    SrpConnectionFactory srpConnFactory = new SrpConnectionFactory();
    srpConnFactory.setPort(port);
    srpConnFactory.setHostName(host);
    srpConnFactory.afterPropertiesSet();

    // JRedis
    JredisConnectionFactory jRedisConnectionFactory = new JredisConnectionFactory();
    jRedisConnectionFactory.setPort(port);
    jRedisConnectionFactory.setHostName(host);
View Full Code Here

TOP

Related Classes of org.springframework.data.redis.connection.srp.SrpConnectionFactory

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.