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 Details

    • doInRedis

      org.reactivestreams.Publisher<T> doInRedis(ReactiveRedisConnection connection) throws org.springframework.dao.DataAccessException
      Gets called by ReactiveRedisTemplate.execute(ReactiveRedisCallback) 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:
      connection - active Redis connection.
      Returns:
      a result object publisher
      Throws:
      org.springframework.dao.DataAccessException - in case of custom exceptions