Interface ValkeyCredentialsProviderFactory


public interface ValkeyCredentialsProviderFactory
Factory interface to create RedisCredentialsProvider from a ValkeyConfiguration. Credentials can be associated with username and/or password.

Credentials are based off the given ValkeyConfiguration objects. Changing the credentials in the actual object affects the constructed RedisCredentials object. Credentials are requested by the Lettuce client after connecting to the host. Therefore, credential retrieval is subject to complete within the configured connection creation timeout to avoid connection failures.

Since:
3.0
Author:
Mark Paluch
  • Method Details

    • createCredentialsProvider

      @Nullable default io.lettuce.core.RedisCredentialsProvider createCredentialsProvider(ValkeyConfiguration valkeyConfiguration)
      Create a RedisCredentialsProvider for data node authentication given ValkeyConfiguration.
      Parameters:
      valkeyConfiguration - the ValkeyConfiguration object.
      Returns:
      a RedisCredentialsProvider that emits RedisCredentials for data node authentication.
    • createSentinelCredentialsProvider

      default io.lettuce.core.RedisCredentialsProvider createSentinelCredentialsProvider(ValkeySentinelConfiguration valkeyConfiguration)
      Create a RedisCredentialsProvider for Sentinel node authentication given ValkeySentinelConfiguration.
      Parameters:
      valkeyConfiguration - the ValkeySentinelConfiguration object.
      Returns:
      a RedisCredentialsProvider that emits RedisCredentials for sentinel authentication.