Interface LettuceConnectionProvider.TargetAware

Enclosing interface:
LettuceConnectionProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface LettuceConnectionProvider.TargetAware
Extension to LettuceConnectionProvider for providers that allow connection creation to specific nodes.
Since:
2.0
Author:
Mark Paluch, Christoph Strobl
  • Method Details

    • getConnection

      default <T extends StatefulConnection<?,?>> T getConnection(Class<T> connectionType, RedisURI redisURI)
      Request a connection given connectionType for a specific RedisURI. Providing a connection type allows specialization to provide a more specific connection type.
      Parameters:
      connectionType - must not be null.
      redisURI - must not be null.
      Returns:
      the requested connection.
    • getConnectionAsync

      <T extends StatefulConnection<?,?>> CompletionStage<T> getConnectionAsync(Class<T> connectionType, RedisURI redisURI)
      Request asynchronously a connection given connectionType for a specific RedisURI. Providing a connection type allows specialization to provide a more specific connection type.
      Parameters:
      connectionType - must not be null.
      redisURI - must not be null.
      Returns:
      a CompletionStage that is notified with the connection progress.
      Since:
      2.2