Package org.springframework.data.keyvalue.redis.serializer

Examples of org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer


   * @param connection Redis connection
   */
  public DefaultStringRedisConnection(RedisConnection connection) {
    Assert.notNull(connection, "connection is required");
    this.delegate = connection;
    this.serializer = new StringRedisSerializer();
  }
View Full Code Here


   * Constructs a new <code>StringRedisTemplate</code> instance.
   * {@link #setConnectionFactory(RedisConnectionFactory)} and {@link #afterPropertiesSet()} still need to be called.
   *
   */
  public StringRedisTemplate() {
    RedisSerializer<String> stringSerializer = new StringRedisSerializer();
    setKeySerializer(stringSerializer);
    setValueSerializer(stringSerializer);
    setHashKeySerializer(stringSerializer);
    setHashValueSerializer(stringSerializer);
  }
View Full Code Here

   *
   * @see #setSerializer(RedisSerializer)
   * @see JdkSerializationRedisSerializer
   */
  protected void initDefaultStrategies() {
    setSerializer(new StringRedisSerializer());
  }
View Full Code Here

    this(redisCounter, factory, Integer.valueOf(initialValue));
  }

  private RedisAtomicInteger(String redisCounter, RedisConnectionFactory factory, Integer initialValue) {
    RedisTemplate<String, Integer> redisTemplate = new RedisTemplate<String, Integer>();
    redisTemplate.setKeySerializer(new StringRedisSerializer());
    redisTemplate.setValueSerializer(new GenericToStringSerializer<Integer>(Integer.class));
    redisTemplate.setExposeConnection(true);
    redisTemplate.setConnectionFactory(factory);
    redisTemplate.afterPropertiesSet();
View Full Code Here

    this(redisCounter, factory, Long.valueOf(initialValue));
  }

  private RedisAtomicLong(String redisCounter, RedisConnectionFactory factory, Long initialValue) {
    RedisTemplate<String, Long> redisTemplate = new RedisTemplate<String, Long>();
    redisTemplate.setKeySerializer(new StringRedisSerializer());
    redisTemplate.setValueSerializer(new GenericToStringSerializer<Long>(Long.class));
    redisTemplate.setExposeConnection(true);
    redisTemplate.setConnectionFactory(factory);
    redisTemplate.afterPropertiesSet();
View Full Code Here

TOP

Related Classes of org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer

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.