Interface ReactiveRedisSessionCallback<K,V,T>
- Type Parameters:
T
-
public interface ReactiveRedisSessionCallback<K,V,T>
Generic callback interface for code that wants to use the same
ReactiveRedisConnection
avoiding connection
allocation overhead upon each Template API method call. Allows to execute any number of operations on a single
ReactiveRedisConnection
, using any type and number of commands.
This is particularly useful for issuing multiple calls on the same connection.
- Since:
- 2.6
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<T>
doWithOperations
(ReactiveRedisOperations<K, V> operations) Gets called byReactiveRedisOperations.executeInSession(ReactiveRedisSessionCallback)
with an active Redis connection.
-
Method Details
-
doWithOperations
org.reactivestreams.Publisher<T> doWithOperations(ReactiveRedisOperations<K, V> operations) throws DataAccessExceptionGets called byReactiveRedisOperations.executeInSession(ReactiveRedisSessionCallback)
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:
operations
- template associated with a connection.- Returns:
- a result object
Publisher
. - Throws:
DataAccessException
- in case of custom exceptions.
-