Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.data.redis.core
Class RedisTemplate<K,V>

    java.lang.Object
      org.springframework.data.redis.core.RedisAccessor
          org.springframework.data.redis.core.RedisTemplate<K,V>

Type Parameters:
  `K` - the Redis key type against which the template works (usually a String)
  `V` - the Redis value type against which the template works

All Implemented Interfaces:
  InitializingBean, RedisOperations<K,V>

Direct Known Subclasses:
  StringRedisTemplate

    public class RedisTemplate<K,V>

extends RedisAccessor
implements RedisOperations<K,V>

Helper class that simplifies Redis data access code.

Performs automatic serialization/deserialization between the given objects and the underlying binary data in the Redis store. By default, it uses Java serialization for its objects (through `JdkSerializationRedisSerializer` ). For String intensive operations consider the dedicated `StringRedisTemplate`.

The central method is execute, supporting Redis access code implementing the `RedisCallback` interface. It provides `RedisConnection` handling such that neither the `RedisCallback` implementation nor the calling code needs to explicitly care about retrieving/closing Redis connections, or handling Connection lifecycle exceptions. For typical single step actions, there are various convenience methods.

Once configured, this class is thread-safe.

Note that while the template is generified, it is up to the serializers/deserializers to properly convert the given Objects to and from binary data.

This is the central class in Redis support.

See Also:
  `StringRedisTemplate`

Field Summary

Fields inherited from class org.springframework.data.redis.core.RedisAccessor
`logger`

Constructor Summary
`RedisTemplate()` Constructs a new `RedisTemplate` instance.

Method Summary
`void` | `afterPropertiesSet()`
`
`<HK,HV> BoundHashOperations<K,HK,HV>`
` | `boundHashOps(K key)` Returns the operations performed on hash values bound to the given key.
`BoundListOperations<K,V>` | `boundListOps(K key)` Returns the operations performed on list values bound to the given key.
`BoundSetOperations<K,V>` | `boundSetOps(K key)` Returns the operations performed on set values bound to the given key.
`BoundValueOperations<K,V>` | `boundValueOps(K key)` Returns the operations performed on simple values (or Strings in Redis terminology) bound to the given key.
`BoundZSetOperations<K,V>` | `boundZSetOps(K key)` Returns the operations performed on zset values (also known as sorted sets) bound to the given key.
`void` | `convertAndSend(String channel, Object message)`
`protected RedisConnection` | `createRedisConnectionProxy(RedisConnection pm)`
`void` | `delete(Collection<K> keys)`
`void` | `delete(K key)`
`void` | `discard()`
`byte[]` | `dump(K key)` Executes the Redis dump command and returns the results.
`List<Object>` | `exec()` Execute a transaction, using the default `RedisSerializer`s to deserialize any results that are byte[]s or Collections or Maps of byte[]s or Tuples.
`List<Object>` | `exec(RedisSerializer<?> valueSerializer)` Execute a transaction, using the provided `RedisSerializer` to deserialize any results that are byte[]s or Collections of byte[]s.
`protected List<Object>` | `execRaw()`
`
`<T> T`
` | `execute(RedisCallback<T> action)` Executes the given action within a Redis connection.
`
`<T> T`
` | `execute(RedisCallback<T> action, boolean exposeConnection)` Executes the given action object within a connection, which can be exposed or not.
`
`<T> T`
` | `execute(RedisCallback<T> action, boolean exposeConnection, boolean pipeline)` Executes the given action object within a connection that can be exposed or not.
`
`<T> T`
` | `execute(RedisScript<T> script, List<K> keys, Object... args)` Executes the given `RedisScript`
`
`<T> T`
` | `execute(RedisScript<T> script, RedisSerializer<?> argsSerializer, RedisSerializer<T> resultSerializer, List<K> keys, Object... args)` Executes the given `RedisScript`, using the provided `RedisSerializer`s to serialize the script arguments and result.
`
`<T> T`
` | `execute(SessionCallback<T> session)` Executes a Redis session.
`List<Object>` | `executePipelined(RedisCallback<?> action)` Executes the given action object on a pipelined connection, returning the results.
`List<Object>` | `executePipelined(RedisCallback<?> action, RedisSerializer<?> resultSerializer)` Executes the given action object on a pipelined connection, returning the results using a dedicated serializer.
`List<Object>` | `executePipelined(SessionCallback<?> session)` Executes the given Redis session on a pipelined connection.
`List<Object>` | `executePipelined(SessionCallback<?> session, RedisSerializer<?> resultSerializer)` Executes the given Redis session on a pipelined connection, returning the results using a dedicated serializer.
`Boolean` | `expire(K key, long timeout, TimeUnit unit)`
`Boolean` | `expireAt(K key, Date date)`
`RedisSerializer<?>` | `getDefaultSerializer()` Returns the default serializer used by this template.
`Long` | `getExpire(K key)`
`Long` | `getExpire(K key, TimeUnit timeUnit)`
`RedisSerializer<?>` | `getHashKeySerializer()` Returns the hashKeySerializer.
`RedisSerializer<?>` | `getHashValueSerializer()` Returns the hashValueSerializer.
`RedisSerializer<?>` | `getKeySerializer()` Returns the key serializer used by this template.
`RedisSerializer<String>` | `getStringSerializer()` Returns the stringSerializer.
`RedisSerializer<?>` | `getValueSerializer()` Returns the value serializer used by this template.
`Boolean` | `hasKey(K key)`
`boolean` | `isEnableDefaultSerializer()`
`boolean` | `isExposeConnection()` Returns whether to expose the native Redis connection to RedisCallback code, or rather a connection proxy (the default).
`Set<K>` | `keys(K pattern)`
`Boolean` | `move(K key, int dbIndex)`
`void` | `multi()` '
`
`<HK,HV> HashOperations<K,HK,HV>`
` | `opsForHash()` Returns the operations performed on hash values.
`ListOperations<K,V>` | `opsForList()` Returns the operations performed on list values.
`SetOperations<K,V>` | `opsForSet()` Returns the operations performed on set values.
`ValueOperations<K,V>` | `opsForValue()` Returns the operations performed on simple values (or Strings in Redis terminology).
`ZSetOperations<K,V>` | `opsForZSet()` Returns the operations performed on zset values (also known as sorted sets).
`Boolean` | `persist(K key)`
`protected
`<T> T`
` | `postProcessResult(T result, RedisConnection conn, boolean existingConnection)`
`protected RedisConnection` | `preProcessConnection(RedisConnection connection, boolean existingConnection)` Processes the connection (before any settings are executed on it).
`K` | `randomKey()`
`void` | `rename(K oldKey, K newKey)`
`Boolean` | `renameIfAbsent(K oldKey, K newKey)`
`void` | `restore(K key, byte[] value, long timeToLive, TimeUnit unit)` Executes the Redis restore command.
`void` | `setDefaultSerializer(RedisSerializer<?> serializer)` Sets the default serializer to use for this template.
`void` | `setEnableDefaultSerializer(boolean enableDefaultSerializer)`
`void` | `setExposeConnection(boolean exposeConnection)` Sets whether to expose the Redis connection to `RedisCallback` code.
`void` | `setHashKeySerializer(RedisSerializer<?> hashKeySerializer)` Sets the hash key (or field) serializer to be used by this template.
`void` | `setHashValueSerializer(RedisSerializer<?> hashValueSerializer)` Sets the hash value serializer to be used by this template.
`void` | `setKeySerializer(RedisSerializer<?> serializer)` Sets the key serializer to be used by this template.
`void` | `setScriptExecutor(ScriptExecutor<K> scriptExecutor)`
`void` | `setStringSerializer(RedisSerializer<String> stringSerializer)` Sets the string value serializer to be used by this template (when the arguments or return types are always strings).
`void` | `setValueSerializer(RedisSerializer<?> serializer)` Sets the value serializer to be used by this template.
`List<V>` | `sort(SortQuery<K> query)`
`
`<T,S> List<T>`
` | `sort(SortQuery<K> query, BulkMapper<T,S> bulkMapper, RedisSerializer<S> resultSerializer)`
`
`<T> List<T>`
` | `sort(SortQuery<K> query, BulkMapper<T,V> bulkMapper)`
`Long` | `sort(SortQuery<K> query, K storeKey)`
`
`<T> List<T>`
` | `sort(SortQuery<K> query, RedisSerializer<T> resultSerializer)`
`DataType` | `type(K key)`
`void` | `unwatch()`
`void` | `watch(Collection<K> keys)`
`void` | `watch(K key)`

Methods inherited from class org.springframework.data.redis.core.RedisAccessor
`getConnectionFactory, setConnectionFactory`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RedisTemplate

    public RedisTemplate()

  Constructs a new `RedisTemplate` instance.

Method Detail

### afterPropertiesSet

    public void afterPropertiesSet()

  Specified by:
    `afterPropertiesSet` in interface `InitializingBean`
  Overrides:
    `afterPropertiesSet` in class `RedisAccessor`

### execute

    public <T> T execute(RedisCallback<T> action)

  Description copied from interface: `RedisOperations`
  Executes the given action within a Redis connection. Application exceptions thrown by the action object get propagated to the caller (can only be unchecked) whenever possible. Redis exceptions are transformed into appropriate DAO ones. Allows for returning a result object, that is a domain object or a collection of domain objects. Performs automatic serialization/deserialization for the given objects to and from binary data suitable for the Redis storage. Note: Callback code is not supposed to handle transactions itself! Use an appropriate transaction manager. Generally, callback code must not touch any Connection lifecycle methods, like close, to let the template do its work.

  Specified by:
    `execute` in interface `RedisOperations<K,V>`
  Type Parameters:
    `T` - return type
  Parameters:
    `action` - callback object that specifies the Redis action
  Returns:
    a result object returned by the action or `null`

### execute

    public <T> T execute(RedisCallback<T> action,
                         boolean exposeConnection)

  Executes the given action object within a connection, which can be exposed or not.

  Type Parameters:
    `T` - return type
  Parameters:
    `action` - callback object that specifies the Redis action
    `exposeConnection` - whether to enforce exposure of the native Redis Connection to callback code
  Returns:
    object returned by the action

### execute

    public <T> T execute(RedisCallback<T> action,
                         boolean exposeConnection,
                         boolean pipeline)

  Executes the given action object within a connection that can be exposed or not. Additionally, the connection can be pipelined. Note the results of the pipeline are discarded (making it suitable for write-only scenarios).

  Type Parameters:
    `T` - return type
  Parameters:
    `action` - callback object to execute
    `exposeConnection` - whether to enforce exposure of the native Redis Connection to callback code
    `pipeline` - whether to pipeline or not the connection for the execution
  Returns:
    object returned by the action

### execute

    public <T> T execute(SessionCallback<T> session)

  Description copied from interface: `RedisOperations`
  Executes a Redis session. Allows multiple operations to be executed in the same session enabling 'transactional' capabilities through `RedisOperations.multi()` and `RedisOperations.watch(Collection)` operations.

  Specified by:
    `execute` in interface `RedisOperations<K,V>`
  Type Parameters:
    `T` - return type
  Parameters:
    `session` - session callback
  Returns:
    result object returned by the action or `null`

### executePipelined

    public List<Object> executePipelined(SessionCallback<?> session)

  Description copied from interface: `RedisOperations`
  Executes the given Redis session on a pipelined connection. Allows transactions to be pipelined. Note that the callback cannot return a non-null value as it gets overwritten by the pipeline.

  Specified by:
    `executePipelined` in interface `RedisOperations<K,V>`
  Parameters:
    `session` - Session callback
  Returns:
    list of objects returned by the pipeline

### executePipelined

    public List<Object> executePipelined(SessionCallback<?> session,
                                         RedisSerializer<?> resultSerializer)

  Description copied from interface: `RedisOperations`
  Executes the given Redis session on a pipelined connection, returning the results using a dedicated serializer. Allows transactions to be pipelined. Note that the callback cannot return a non-null value as it gets overwritten by the pipeline.

  Specified by:
    `executePipelined` in interface `RedisOperations<K,V>`
  Parameters:
    `session` - Session callback
  Returns:
    list of objects returned by the pipeline

### executePipelined

    public List<Object> executePipelined(RedisCallback<?> action)

  Description copied from interface: `RedisOperations`
  Executes the given action object on a pipelined connection, returning the results. Note that the callback cannot return a non-null value as it gets overwritten by the pipeline. This method will use the default serializers to deserialize results

  Specified by:
    `executePipelined` in interface `RedisOperations<K,V>`
  Parameters:
    `action` - callback object to execute
  Returns:
    list of objects returned by the pipeline

### executePipelined

    public List<Object> executePipelined(RedisCallback<?> action,
                                         RedisSerializer<?> resultSerializer)

  Description copied from interface: `RedisOperations`
  Executes the given action object on a pipelined connection, returning the results using a dedicated serializer. Note that the callback cannot return a non-null value as it gets overwritten by the pipeline.

  Specified by:
    `executePipelined` in interface `RedisOperations<K,V>`
  Parameters:
    `action` - callback object to execute
    `resultSerializer` - The Serializer to use for individual values or Collections of values. If any returned values are hashes, this serializer will be used to deserialize both the key and value
  Returns:
    list of objects returned by the pipeline

### execute

    public <T> T execute(RedisScript<T> script,
                         List<K> keys,
                         Object... args)

  Description copied from interface: `RedisOperations`
  Executes the given `RedisScript`

  Specified by:
    `execute` in interface `RedisOperations<K,V>`
  Parameters:
    `script` - The script to execute
    `keys` - Any keys that need to be passed to the script
    `args` - Any args that need to be passed to the script
  Returns:
    The return value of the script or null if `RedisScript.getResultType()` is null, likely indicating a throw-away status reply (i.e. "OK")

### execute

    public <T> T execute(RedisScript<T> script,
                         RedisSerializer<?> argsSerializer,
                         RedisSerializer<T> resultSerializer,
                         List<K> keys,
                         Object... args)

  Description copied from interface: `RedisOperations`
  Executes the given `RedisScript`, using the provided `RedisSerializer`s to serialize the script arguments and result.

  Specified by:
    `execute` in interface `RedisOperations<K,V>`
  Parameters:
    `script` - The script to execute
    `argsSerializer` - The `RedisSerializer` to use for serializing args
    `resultSerializer` - The `RedisSerializer` to use for serializing the script return value
    `keys` - Any keys that need to be passed to the script
    `args` - Any args that need to be passed to the script
  Returns:
    The return value of the script or null if `RedisScript.getResultType()` is null, likely indicating a throw-away status reply (i.e. "OK")

### createRedisConnectionProxy

    protected RedisConnection createRedisConnectionProxy(RedisConnection pm)

### preProcessConnection

    protected RedisConnection preProcessConnection(RedisConnection connection,
                                                   boolean existingConnection)

  Processes the connection (before any settings are executed on it). Default implementation returns the connection as is.

  Parameters:
    `connection` - redis connection

### postProcessResult

    protected <T> T postProcessResult(T result,
                                      RedisConnection conn,
                                      boolean existingConnection)

### isExposeConnection

    public boolean isExposeConnection()

  Returns whether to expose the native Redis connection to RedisCallback code, or rather a connection proxy (the default).

  Returns:
    whether to expose the native Redis connection or not

### setExposeConnection

    public void setExposeConnection(boolean exposeConnection)

  Sets whether to expose the Redis connection to `RedisCallback` code. Default is "false": a proxy will be returned, suppressing `quit` and `disconnect` calls.

  Parameters:
    `exposeConnection` -

### isEnableDefaultSerializer

    public boolean isEnableDefaultSerializer()

  Returns:
    Whether or not the default serializer should be used. If not, any serializers not explicilty set will remain null and values will not be serialized or deserialized.

### setEnableDefaultSerializer

    public void setEnableDefaultSerializer(boolean enableDefaultSerializer)

  Parameters:
    `enableDefaultSerializer` - Whether or not the default serializer should be used. If not, any serializers not explicilty set will remain null and values will not be serialized or deserialized.

### getDefaultSerializer

    public RedisSerializer<?> getDefaultSerializer()

  Returns the default serializer used by this template.

  Returns:
    template default serializer

### setDefaultSerializer

    public void setDefaultSerializer(RedisSerializer<?> serializer)

  Sets the default serializer to use for this template. All serializers (expect the `setStringSerializer(RedisSerializer)`) are initialized to this value unless explicitly set. Defaults to `JdkSerializationRedisSerializer`.

  Parameters:
    `serializer` - default serializer to use

### setKeySerializer

    public void setKeySerializer(RedisSerializer<?> serializer)

  Sets the key serializer to be used by this template. Defaults to `getDefaultSerializer()`.

  Parameters:
    `serializer` - the key serializer to be used by this template.

### getKeySerializer

    public RedisSerializer<?> getKeySerializer()

  Returns the key serializer used by this template.

  Specified by:
    `getKeySerializer` in interface `RedisOperations<K,V>`
  Returns:
    the key serializer used by this template.

### setValueSerializer

    public void setValueSerializer(RedisSerializer<?> serializer)

  Sets the value serializer to be used by this template. Defaults to `getDefaultSerializer()`.

  Parameters:
    `serializer` - the value serializer to be used by this template.

### getValueSerializer

    public RedisSerializer<?> getValueSerializer()

  Returns the value serializer used by this template.

  Specified by:
    `getValueSerializer` in interface `RedisOperations<K,V>`
  Returns:
    the value serializer used by this template.

### getHashKeySerializer

    public RedisSerializer<?> getHashKeySerializer()

  Returns the hashKeySerializer.

  Specified by:
    `getHashKeySerializer` in interface `RedisOperations<K,V>`
  Returns:
    Returns the hashKeySerializer

### setHashKeySerializer

    public void setHashKeySerializer(RedisSerializer<?> hashKeySerializer)

  Sets the hash key (or field) serializer to be used by this template. Defaults to `getDefaultSerializer()`.

  Parameters:
    `hashKeySerializer` - The hashKeySerializer to set.

### getHashValueSerializer

    public RedisSerializer<?> getHashValueSerializer()

  Returns the hashValueSerializer.

  Specified by:
    `getHashValueSerializer` in interface `RedisOperations<K,V>`
  Returns:
    Returns the hashValueSerializer

### setHashValueSerializer

    public void setHashValueSerializer(RedisSerializer<?> hashValueSerializer)

  Sets the hash value serializer to be used by this template. Defaults to `getDefaultSerializer()`.

  Parameters:
    `hashValueSerializer` - The hashValueSerializer to set.

### getStringSerializer

    public RedisSerializer<String> getStringSerializer()

  Returns the stringSerializer.

  Returns:
    Returns the stringSerializer

### setStringSerializer

    public void setStringSerializer(RedisSerializer<String> stringSerializer)

  Sets the string value serializer to be used by this template (when the arguments or return types are always strings). Defaults to `StringRedisSerializer`.

  Parameters:
    `stringSerializer` - The stringValueSerializer to set.
  See Also:
    `ValueOperations.get(Object, long, long)`

### setScriptExecutor

    public void setScriptExecutor(ScriptExecutor<K> scriptExecutor)

  Parameters:
    `scriptExecutor` - The `ScriptExecutor` to use for executing Redis scripts

### exec

    public List<Object> exec()

  Execute a transaction, using the default `RedisSerializer`s to deserialize any results that are byte[]s or Collections or Maps of byte[]s or Tuples. Other result types (Long, Boolean, etc) are left as-is in the converted results. If conversion of tx results has been disabled in the `RedisConnectionFactory`, the results of exec will be returned without deserialization. This check is mostly for backwards compatibility with 1.0.

  Specified by:
    `exec` in interface `RedisOperations<K,V>`
  Returns:
    The (possibly deserialized) results of transaction exec

### exec

    public List<Object> exec(RedisSerializer<?> valueSerializer)

  Description copied from interface: `RedisOperations`
  Execute a transaction, using the provided `RedisSerializer` to deserialize any results that are byte[]s or Collections of byte[]s. If a result is a Map, the provided `RedisSerializer` will be used for both the keys and values. Other result types (Long, Boolean, etc) are left as-is in the converted results. Tuple results are automatically converted to TypedTuples.

  Specified by:
    `exec` in interface `RedisOperations<K,V>`
  Parameters:
    `valueSerializer` - The `RedisSerializer` to use for deserializing the results of transaction exec
  Returns:
    The deserialized results of transaction exec

### execRaw

    protected List<Object> execRaw()

### delete

    public void delete(K key)

  Specified by:
    `delete` in interface `RedisOperations<K,V>`

### delete

    public void delete(Collection<K> keys)

  Specified by:
    `delete` in interface `RedisOperations<K,V>`

### hasKey

    public Boolean hasKey(K key)

  Specified by:
    `hasKey` in interface `RedisOperations<K,V>`

### expire

    public Boolean expire(K key,
                          long timeout,
                          TimeUnit unit)

  Specified by:
    `expire` in interface `RedisOperations<K,V>`

### expireAt

    public Boolean expireAt(K key,
                            Date date)

  Specified by:
    `expireAt` in interface `RedisOperations<K,V>`

### convertAndSend

    public void convertAndSend(String channel,
                               Object message)

  Specified by:
    `convertAndSend` in interface `RedisOperations<K,V>`

### getExpire

    public Long getExpire(K key)

  Specified by:
    `getExpire` in interface `RedisOperations<K,V>`

### getExpire

    public Long getExpire(K key,
                          TimeUnit timeUnit)

  Specified by:
    `getExpire` in interface `RedisOperations<K,V>`

### keys

    public Set<K> keys(K pattern)

  Specified by:
    `keys` in interface `RedisOperations<K,V>`

### persist

    public Boolean persist(K key)

  Specified by:
    `persist` in interface `RedisOperations<K,V>`

### move

    public Boolean move(K key,
                        int dbIndex)

  Specified by:
    `move` in interface `RedisOperations<K,V>`

### randomKey

    public K randomKey()

  Specified by:
    `randomKey` in interface `RedisOperations<K,V>`

### rename

    public void rename(K oldKey,
                       K newKey)

  Specified by:
    `rename` in interface `RedisOperations<K,V>`

### renameIfAbsent

    public Boolean renameIfAbsent(K oldKey,
                                  K newKey)

  Specified by:
    `renameIfAbsent` in interface `RedisOperations<K,V>`

### type

    public DataType type(K key)

  Specified by:
    `type` in interface `RedisOperations<K,V>`

### dump

    public byte[] dump(K key)

  Executes the Redis dump command and returns the results. Redis uses a non-standard serialization mechanism and includes checksum information, thus the raw bytes are returned as opposed to deserializing with valueSerializer. Use the return value of dump as the value argument to restore

  Specified by:
    `dump` in interface `RedisOperations<K,V>`
  Parameters:
    `key` - The key to dump
  Returns:
    results The results of the dump operation

### restore

    public void restore(K key,
                        byte[] value,
                        long timeToLive,
                        TimeUnit unit)

  Executes the Redis restore command. The value passed in should be the exact serialized data returned from `dump(Object)`, since Redis uses a non-standard serialization mechanism.

  Specified by:
    `restore` in interface `RedisOperations<K,V>`
  Parameters:
    `key` - The key to restore
    `value` - The value to restore, as returned by `dump(Object)`
    `timeToLive` - An expiration for the restored key, or 0 for no expiration
    `unit` - The time unit for timeToLive
  Throws:
    `RedisSystemException` - if the key you are attempting to restore already exists.

### multi

    public void multi()

  Description copied from interface: `RedisOperations`
  '

  Specified by:
    `multi` in interface `RedisOperations<K,V>`

### discard

    public void discard()

  Specified by:
    `discard` in interface `RedisOperations<K,V>`

### watch

    public void watch(K key)

  Specified by:
    `watch` in interface `RedisOperations<K,V>`

### watch

    public void watch(Collection<K> keys)

  Specified by:
    `watch` in interface `RedisOperations<K,V>`

### unwatch

    public void unwatch()

  Specified by:
    `unwatch` in interface `RedisOperations<K,V>`

### sort

    public List<V> sort(SortQuery<K> query)

  Specified by:
    `sort` in interface `RedisOperations<K,V>`

### sort

    public <T> List<T> sort(SortQuery<K> query,
                            RedisSerializer<T> resultSerializer)

  Specified by:
    `sort` in interface `RedisOperations<K,V>`

### sort

    public <T> List<T> sort(SortQuery<K> query,
                            BulkMapper<T,V> bulkMapper)

  Specified by:
    `sort` in interface `RedisOperations<K,V>`

### sort

    public <T,S> List<T> sort(SortQuery<K> query,
                              BulkMapper<T,S> bulkMapper,
                              RedisSerializer<S> resultSerializer)

  Specified by:
    `sort` in interface `RedisOperations<K,V>`

### sort

    public Long sort(SortQuery<K> query,
                     K storeKey)

  Specified by:
    `sort` in interface `RedisOperations<K,V>`

### boundValueOps

    public BoundValueOperations<K,V> boundValueOps(K key)

  Description copied from interface: `RedisOperations`
  Returns the operations performed on simple values (or Strings in Redis terminology) bound to the given key.

  Specified by:
    `boundValueOps` in interface `RedisOperations<K,V>`
  Parameters:
    `key` - Redis key
  Returns:
    value operations bound to the given key

### opsForValue

    public ValueOperations<K,V> opsForValue()

  Description copied from interface: `RedisOperations`
  Returns the operations performed on simple values (or Strings in Redis terminology).

  Specified by:
    `opsForValue` in interface `RedisOperations<K,V>`
  Returns:
    value operations

### opsForList

    public ListOperations<K,V> opsForList()

  Description copied from interface: `RedisOperations`
  Returns the operations performed on list values.

  Specified by:
    `opsForList` in interface `RedisOperations<K,V>`
  Returns:
    list operations

### boundListOps

    public BoundListOperations<K,V> boundListOps(K key)

  Description copied from interface: `RedisOperations`
  Returns the operations performed on list values bound to the given key.

  Specified by:
    `boundListOps` in interface `RedisOperations<K,V>`
  Parameters:
    `key` - Redis key
  Returns:
    list operations bound to the given key

### boundSetOps

    public BoundSetOperations<K,V> boundSetOps(K key)

  Description copied from interface: `RedisOperations`
  Returns the operations performed on set values bound to the given key.

  Specified by:
    `boundSetOps` in interface `RedisOperations<K,V>`
  Parameters:
    `key` - Redis key
  Returns:
    set operations bound to the given key

### opsForSet

    public SetOperations<K,V> opsForSet()

  Description copied from interface: `RedisOperations`
  Returns the operations performed on set values.

  Specified by:
    `opsForSet` in interface `RedisOperations<K,V>`
  Returns:
    set operations

### boundZSetOps

    public BoundZSetOperations<K,V> boundZSetOps(K key)

  Description copied from interface: `RedisOperations`
  Returns the operations performed on zset values (also known as sorted sets) bound to the given key.

  Specified by:
    `boundZSetOps` in interface `RedisOperations<K,V>`
  Parameters:
    `key` - Redis key
  Returns:
    zset operations bound to the given key.

### opsForZSet

    public ZSetOperations<K,V> opsForZSet()

  Description copied from interface: `RedisOperations`
  Returns the operations performed on zset values (also known as sorted sets).

  Specified by:
    `opsForZSet` in interface `RedisOperations<K,V>`
  Returns:
    zset operations

### boundHashOps

    public <HK,HV> BoundHashOperations<K,HK,HV> boundHashOps(K key)

  Description copied from interface: `RedisOperations`
  Returns the operations performed on hash values bound to the given key.

  Specified by:
    `boundHashOps` in interface `RedisOperations<K,V>`
  Type Parameters:
    `HK` - hash key (or field) type
    `HV` - hash value type
  Parameters:
    `key` - Redis key
  Returns:
    hash operations bound to the given key.

### opsForHash

    public <HK,HV> HashOperations<K,HK,HV> opsForHash()

  Description copied from interface: `RedisOperations`
  Returns the operations performed on hash values.

  Specified by:
    `opsForHash` in interface `RedisOperations<K,V>`
  Type Parameters:
    `HK` - hash key (or field) type
    `HV` - hash value type
  Returns:
    hash operations

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD