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 Details

    • doWithOperations

      org.reactivestreams.Publisher<T> doWithOperations(ReactiveRedisOperations<K,V> operations) throws org.springframework.dao.DataAccessException
      Gets called by ReactiveRedisOperations.executeInSession(ReactiveRedisSessionCallback) with an active Redis connection. Does not need to care about activating or closing the ReactiveRedisConnection.

      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:
      org.springframework.dao.DataAccessException - in case of custom exceptions.