Class RedisConnectionUtil
java.lang.Object
io.micronaut.configuration.lettuce.RedisConnectionUtil
Internal utility methods for configuration.
- Since:
 - 1.0
 - Author:
 - Graeme Rocher, Illia Kovalov
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull io.lettuce.core.AbstractRedisClientfindClient(io.micronaut.context.BeanLocator beanLocator, Optional<String> serverName, String errorMessage) Utility method for establishing a redis connection.static io.lettuce.core.api.StatefulConnectionfindRedisConnection(io.micronaut.context.BeanLocator beanLocator, Optional<String> serverName, String errorMessage) Utility method for establishing a redis connection.static io.lettuce.core.api.StatefulConnection<byte[],byte[]> openBytesRedisConnection(io.micronaut.context.BeanLocator beanLocator, Optional<String> serverName, String errorMessage) Utility method for opening a new bytes redis connection. 
- 
Constructor Details
- 
RedisConnectionUtil
public RedisConnectionUtil() 
 - 
 - 
Method Details
- 
findClient
@NonNull public static @NonNull io.lettuce.core.AbstractRedisClient findClient(io.micronaut.context.BeanLocator beanLocator, Optional<String> serverName, String errorMessage) Utility method for establishing a redis connection.- Parameters:
 beanLocator- The bean locator to useserverName- The server name to useerrorMessage- The error message to use if the connection can't be found- Returns:
 - The connection
 - Throws:
 io.micronaut.context.exceptions.ConfigurationException- If the connection cannot be found
 - 
findRedisConnection
public static io.lettuce.core.api.StatefulConnection findRedisConnection(io.micronaut.context.BeanLocator beanLocator, Optional<String> serverName, String errorMessage) Utility method for establishing a redis connection.- Parameters:
 beanLocator- The bean locator to useserverName- The server name to useerrorMessage- The error message to use if the connection can't be found- Returns:
 - The connection
 - Throws:
 io.micronaut.context.exceptions.ConfigurationException- If the connection cannot be found
 - 
openBytesRedisConnection
public static io.lettuce.core.api.StatefulConnection<byte[],byte[]> openBytesRedisConnection(io.micronaut.context.BeanLocator beanLocator, Optional<String> serverName, String errorMessage) Utility method for opening a new bytes redis connection.- Parameters:
 beanLocator- The bean locator to useserverName- The server name to useerrorMessage- The error message to use if the connection can't be found- Returns:
 - The connection
 - Throws:
 io.micronaut.context.exceptions.ConfigurationException- If the connection cannot be found
 
 -