redis.clients.jedis.RedisCredentialsProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis;
import java.util.function.Supplier;
public interface RedisCredentialsProvider extends Supplier {
/**
* Prepare {@link RedisCredentials} before {@link RedisCredentialsProvider#get()} is called.
*
* An application may:
*
* - Load credentials from the credentials management system
* - Reload credentials when credentials are rotated.
* - Reload credentials after an authentication error (e.g. NOAUTH, WRONGPASS, etc).
* - Minimize the time that the password lives in the memory (in combination with
* {@link RedisCredentialsProvider#cleanUp()}).
*
*/
default void prepare() { }
/**
* Clean up credentials (e.g. from memory).
*
* @see RedisCredentialsProvider#prepare()
*/
default void cleanUp() { }
}