Class RedisConnectionUtil
- java.lang.Object
-
- io.micronaut.configuration.lettuce.RedisConnectionUtil
-
@Internal public class RedisConnectionUtil extends java.lang.ObjectInternal utility methods for configuration.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description RedisConnectionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.lettuce.core.AbstractRedisClientfindClient(io.micronaut.context.BeanLocator beanLocator, java.util.Optional<java.lang.String> serverName, java.lang.String errorMessage)Utility method for establishing a redis connection.static io.lettuce.core.api.StatefulConnectionfindRedisConnection(io.micronaut.context.BeanLocator beanLocator, java.util.Optional<java.lang.String> serverName, java.lang.String errorMessage)Utility method for establishing a redis connection.static io.lettuce.core.api.StatefulConnection<byte[],byte[]>openBytesRedisConnection(io.micronaut.context.BeanLocator beanLocator, java.util.Optional<java.lang.String> serverName, java.lang.String errorMessage)Utility method for opening a new bytes redis connection.
-
-
-
Method Detail
-
findClient
@NonNull public static io.lettuce.core.AbstractRedisClient findClient(io.micronaut.context.BeanLocator beanLocator, java.util.Optional<java.lang.String> serverName, java.lang.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, java.util.Optional<java.lang.String> serverName, java.lang.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, java.util.Optional<java.lang.String> serverName, java.lang.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
-
-