public interface RedisCallback<T>
RedisTemplate
execution methods, often as
anonymous classes within a method implementation. Usually, used for chaining several operations together (
get/set/trim etc...
.Modifier and Type | Method and Description |
---|---|
T |
doInRedis(RedisConnection connection)
Method called by
RedisTemplate with an active RedisConnection . |
@Nullable T doInRedis(RedisConnection connection) throws DataAccessException
RedisTemplate
with an active RedisConnection
.
Callback code need not care about activating/opening or closing the RedisConnection
,
nor handling exceptions
.
connection
- active Redis connection
.result
of the operation performed in the callback or null
.DataAccessException
- if the operation performed by the callback fails to execute in the context of Redis
using the given RedisConnection
.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.