public abstract class AbstractRedisCacheConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.nio.charset.Charset |
charset |
protected java.lang.String |
expirationAfterWritePolicy |
protected java.time.Duration |
expireAfterAccess |
protected java.time.Duration |
expireAfterWrite |
protected java.lang.Class<io.micronaut.core.serialize.ObjectSerializer> |
keySerializer |
protected java.lang.String |
server |
protected java.lang.Class<io.micronaut.core.serialize.ObjectSerializer> |
valueSerializer |
Constructor and Description |
---|
AbstractRedisCacheConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.nio.charset.Charset |
getCharset() |
java.util.Optional<java.lang.String> |
getExpirationAfterWritePolicy() |
java.util.Optional<java.time.Duration> |
getExpireAfterAccess()
Specifies that each entry should be automatically removed from the cache once a fixed duration
has elapsed after the entry's creation, the most recent replacement of its value, or its last
read.
|
java.util.Optional<java.time.Duration> |
getExpireAfterWrite() |
java.util.Optional<java.lang.Class<io.micronaut.core.serialize.ObjectSerializer>> |
getKeySerializer()
The
ObjectSerializer to use for serializing keys. |
java.util.Optional<java.lang.String> |
getServer() |
java.util.Optional<java.lang.Class<io.micronaut.core.serialize.ObjectSerializer>> |
getValueSerializer() |
void |
setCharset(java.nio.charset.Charset charset) |
void |
setExpirationAfterWritePolicy(java.lang.String expirationAfterWritePolicy) |
void |
setExpireAfterAccess(java.time.Duration expireAfterAccess) |
void |
setExpireAfterWrite(java.time.Duration expireAfterWrite) |
protected java.lang.String server
protected java.lang.Class<io.micronaut.core.serialize.ObjectSerializer> keySerializer
protected java.lang.Class<io.micronaut.core.serialize.ObjectSerializer> valueSerializer
protected java.nio.charset.Charset charset
protected java.time.Duration expireAfterWrite
protected java.time.Duration expireAfterAccess
protected java.lang.String expirationAfterWritePolicy
public AbstractRedisCacheConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
applicationConfiguration
- applicationConfigurationpublic java.util.Optional<java.lang.String> getServer()
NamedRedisServersConfiguration
public java.util.Optional<java.lang.Class<io.micronaut.core.serialize.ObjectSerializer>> getValueSerializer()
ObjectSerializer
type to use for serializing values.public java.util.Optional<java.lang.Class<io.micronaut.core.serialize.ObjectSerializer>> getKeySerializer()
ObjectSerializer
to use for serializing keys. Defaults to DefaultStringKeySerializer
.ObjectSerializer
classpublic java.util.Optional<java.time.Duration> getExpireAfterWrite()
public java.util.Optional<java.time.Duration> getExpireAfterAccess()
Duration
public java.util.Optional<java.lang.String> getExpirationAfterWritePolicy()
public java.nio.charset.Charset getCharset()
public void setExpireAfterWrite(java.time.Duration expireAfterWrite)
expireAfterWrite
- The cache expiration duration after writing into it.public void setExpireAfterAccess(java.time.Duration expireAfterAccess)
expireAfterAccess
- The cache expiration duration after accessing itpublic void setCharset(java.nio.charset.Charset charset)
charset
- The charset used to serialize and deserialize valuespublic void setExpirationAfterWritePolicy(java.lang.String expirationAfterWritePolicy)
expirationAfterWritePolicy
- The class path for an implementation of ExpirationAfterWritePolicy