Interface ReactiveRedisCallback<T>
- Type Parameters:
T
-
public interface ReactiveRedisCallback<T>
Generic callback interface for code that operates on a low-level
ReactiveRedisConnection
. Allows to execute
any number of operations on a single ReactiveRedisConnection
, using any type and number of commands.
This is particularly useful for delegating to existing data access code that expects a
ReactiveRedisConnection
to work on. For newly written code, it is strongly recommended to use
ReactiveRedisOperations
's more specific operations.
- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<T>
doInRedis
(ReactiveRedisConnection connection) Gets called byReactiveRedisTemplate.execute(ReactiveRedisCallback)
with an active Redis connection.
-
Method Details
-
doInRedis
org.reactivestreams.Publisher<T> doInRedis(ReactiveRedisConnection connection) throws DataAccessException Gets called byReactiveRedisTemplate.execute(ReactiveRedisCallback)
with an active Redis connection. Does not need to care about activating or closing theReactiveRedisConnection
.Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain objects.
- Parameters:
connection
- active Redis connection.- Returns:
- a result object publisher
- Throws:
DataAccessException
- in case of custom exceptions
-