Interface RedisCallback<T>
public interface RedisCallback<T>
Callback interface for Redis 'low level' code. To be used with
RedisTemplate
execution methods, often as
anonymous classes within a method implementation. Usually, used for chaining several operations together (
get/set/trim etc...
.- Author:
- Costin Leau
-
Method Summary
Modifier and TypeMethodDescriptiondoInRedis
(RedisConnection connection) Gets called byRedisTemplate
with an active Redis connection.
-
Method Details
-
doInRedis
Gets called byRedisTemplate
with an active Redis connection. Does not need to care about activating or closing the connection or handling exceptions.- Parameters:
connection
- active Redis connection- Returns:
- a result object or
null
if none - Throws:
DataAccessException
-