@ConfigurationProperties(value="redis")
public class RedisHttpSessionConfiguration
extends io.micronaut.session.http.HttpSessionConfiguration
implements io.micronaut.core.util.Toggleable
Constructor and Description |
---|
RedisHttpSessionConfiguration() |
Modifier and Type | Method and Description |
---|---|
String |
getActiveSessionsKey() |
Charset |
getCharset() |
Duration |
getExpiredSessionCheck() |
String |
getNamespace() |
Optional<String> |
getServerName() |
String |
getSessionCreatedTopic() |
Optional<Class<io.micronaut.core.serialize.ObjectSerializer>> |
getValueSerializer() |
io.micronaut.configuration.lettuce.session.RedisHttpSessionConfiguration.WriteMode |
getWriteMode() |
boolean |
isEnableKeyspaceEvents() |
void |
setActiveSessionsKey(String activeSessionsKey)
Sets the key to store active sessions in.
|
void |
setCharset(Charset charset)
Sets the charset to use to serialize values.
|
void |
setEnableKeyspaceEvents(boolean enableKeyspaceEvents)
Sets whether keyspace events should be enabled at startup.
|
void |
setExpiredSessionCheck(Duration expiredSessionCheck)
Sets the duration to check for expired sessions.
|
void |
setNamespace(String namespace)
Sets the namespace to use.
|
void |
setServerName(String serverName)
Sets the server name.
|
void |
setSessionCreatedTopic(String sessionCreatedTopic)
Sets the topic to publish session created events to.
|
void |
setValueSerializer(Class<io.micronaut.core.serialize.ObjectSerializer> valueSerializer)
Sets the default value serializer to use.
|
void |
setWriteMode(io.micronaut.configuration.lettuce.session.RedisHttpSessionConfiguration.WriteMode writeMode)
Sets the write mode to use.
|
getCookieMaxAge, getCookieName, getCookiePath, getDomainName, getHeaderNames, getPrefix, isBase64Encode, isRememberMe, setBase64Encode, setCookieMaxAge, setCookieName, setCookiePath, setDomainName, setHeaderNames, setPrefix, setRememberMe
getMaxActiveSessions, getMaxInactiveInterval, setMaxActiveSessions, setMaxInactiveInterval
public String getNamespace()
public Optional<String> getServerName()
public String getSessionCreatedTopic()
public String getActiveSessionsKey()
public Optional<Class<io.micronaut.core.serialize.ObjectSerializer>> getValueSerializer()
ObjectSerializer
type to use for serializing values. Defaults to JdkSerializer
public Charset getCharset()
public boolean isEnableKeyspaceEvents()
public io.micronaut.configuration.lettuce.session.RedisHttpSessionConfiguration.WriteMode getWriteMode()
RedisHttpSessionConfiguration.WriteMode
to use. Defaults to RedisHttpSessionConfiguration.WriteMode.BATCH
public Duration getExpiredSessionCheck()
public void setNamespace(String namespace)
namespace
- The namespacepublic void setServerName(String serverName)
serverName
- The server namepublic void setSessionCreatedTopic(String sessionCreatedTopic)
sessionCreatedTopic
- The session created topicpublic void setActiveSessionsKey(String activeSessionsKey)
activeSessionsKey
- The active session keypublic void setValueSerializer(Class<io.micronaut.core.serialize.ObjectSerializer> valueSerializer)
valueSerializer
- The value serializerpublic void setCharset(Charset charset)
charset
- The default charsetpublic void setEnableKeyspaceEvents(boolean enableKeyspaceEvents)
enableKeyspaceEvents
- True if keyspace event should be enabledpublic void setWriteMode(io.micronaut.configuration.lettuce.session.RedisHttpSessionConfiguration.WriteMode writeMode)
writeMode
- The write modepublic void setExpiredSessionCheck(Duration expiredSessionCheck)
expiredSessionCheck
- The expired session check