org.springframework.data.keyvalue.redis.core
Class StringRedisTemplate
java.lang.Object
org.springframework.data.keyvalue.redis.core.RedisAccessor
org.springframework.data.keyvalue.redis.core.RedisTemplate<String,String>
org.springframework.data.keyvalue.redis.core.StringRedisTemplate
- All Implemented Interfaces:
- InitializingBean, RedisOperations<String,String>
public class StringRedisTemplate
- extends RedisTemplate<String,String>
String-focused extension of RedisTemplate. Since most operations against Redis are String based,
this class provides a dedicated class that minimizes configuration of its more generic
template
especially in terms of serializers.
Note that this template exposes the RedisConnection
used by the RedisCallback
as a StringRedisConnection
.
- Author:
- Costin Leau
Methods inherited from class org.springframework.data.keyvalue.redis.core.RedisTemplate |
afterPropertiesSet, boundHashOps, boundListOps, boundSetOps, boundValueOps, boundZSetOps, convertAndSend, createRedisConnectionProxy, delete, discard, exec, execute, execute, execute, execute, execute, execute, expire, expireAt, getDefaultSerializer, getExpire, getKeySerializer, getValueSerializer, hasKey, isExposeConnection, keys, multi, opsForHash, opsForList, opsForSet, opsForValue, opsForZSet, persist, postProcessResult, randomKey, rename, renameIfAbsent, setDefaultSerializer, setExposeConnection, setHashKeySerializer, setHashValueSerializer, setKeySerializer, setStringSerializer, setValueSerializer, sort, sort, type, unwatch, watch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringRedisTemplate
public StringRedisTemplate()
- Constructs a new
StringRedisTemplate
instance.
StringRedisTemplate
public StringRedisTemplate(RedisConnectionFactory connectionFactory)
- Constructs a new
StringRedisTemplate
instance.
- Parameters:
connectionFactory
- connection factory for creating new connections
preProcessConnection
protected RedisConnection preProcessConnection(RedisConnection connection,
boolean existingConnection)
- Description copied from class:
RedisTemplate
- Processes the connection (before any settings are executed on it). Default implementation returns the connection as is.
- Overrides:
preProcessConnection
in class RedisTemplate<String,String>
- Parameters:
connection
- redis connection
Copyright © 2010-2011 SpringSource. All Rights Reserved.