Package io.micronaut.microstream.cache
Class MicroStreamCacheConfigurationProperties<K,V> 
java.lang.Object
io.micronaut.microstream.cache.MicroStreamCacheConfigurationProperties<K,V> 
- Type Parameters:
 K- Key TypeV- Value Type
- All Implemented Interfaces:
 io.micronaut.core.naming.Named,io.micronaut.core.util.Toggleable,MicroStreamCacheConfiguration<K,V> 
@EachProperty("microstream.cache")
public class MicroStreamCacheConfigurationProperties<K,V> 
extends Object
implements MicroStreamCacheConfiguration<K,V> 
- Since:
 - 1.0.0
 - Author:
 - Sergio del Amo
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanWhether this cache is enabled by default.static final String - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetName()booleanWhether management is enabled on this cache.When in "read-through" mode, cache misses that occur due to cache entries not existing as a result of performing a "get" will appropriately cause the configured CacheLoader to be invoked.Whether statistics collection is enabled in this cache.When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.When in "write-through" mode, cache updates that occur as a result of performing "put" operations will appropriately cause the configured CacheWriter to be invoked.voidsetEnabled(boolean enabled) Whether this cache is enabled.voidsetKeyType(Class<K> keyType) voidsetManagementEnabled(Boolean managementEnabled) Whether management is enabled on this cache.voidsetReadThrough(Boolean readThrough) When in "read-through" mode, cache misses that occur due to cache entries not existing as a result of performing a "get" will appropriately cause the configured CacheLoader to be invoked.voidsetStatisticsEnabled(Boolean statisticsEnabled) Whether statistics collection is enabled in this cache.voidsetStorage(String storage) voidsetStoreByValue(Boolean storeByValue) When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.voidsetValueType(Class<V> valueType) voidsetWriteThrough(Boolean writeThrough) When in "write-through" mode, cache updates that occur as a result of performing "put" operations will appropriately cause the configured CacheWriter to be invoked.When you set a Storage Manager, "write-through" mode is activated. 
- 
Field Details
- 
PREFIX
- See Also:
 
 - 
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDWhether this cache is enabled by default.- See Also:
 
 
 - 
 - 
Constructor Details
- 
MicroStreamCacheConfigurationProperties
 
 - 
 - 
Method Details
- 
getKeyType
- Specified by:
 getKeyTypein interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - The required type of keys for the Cache.
 
 - 
getValueType
- Specified by:
 getValueTypein interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - Determines type of values for the Cache.
 
 - 
getStorage
- Specified by:
 getStoragein interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - Name qualifier for Storage Manager.
 
 - 
isReadThrough
Description copied from interface:MicroStreamCacheConfigurationWhen in "read-through" mode, cache misses that occur due to cache entries not existing as a result of performing a "get" will appropriately cause the configured CacheLoader to be invoked.- Specified by:
 isReadThroughin interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - Whether to use "read-through" mode
 
 - 
isWriteThrough
Description copied from interface:MicroStreamCacheConfigurationWhen in "write-through" mode, cache updates that occur as a result of performing "put" operations will appropriately cause the configured CacheWriter to be invoked.- Specified by:
 isWriteThroughin interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - Whether to use "write-through" mode.
 
 - 
isStoreByValue
Description copied from interface:MicroStreamCacheConfigurationWhen a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.- Specified by:
 isStoreByValuein interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - Whether the cache is Story by value.
 
 - 
isStatisticsEnabled
Description copied from interface:MicroStreamCacheConfigurationWhether statistics collection is enabled in this cache.- Specified by:
 isStatisticsEnabledin interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - Whether statistics collection is enabled in this cache.
 
 - 
isManagementEnabled
Description copied from interface:MicroStreamCacheConfigurationWhether management is enabled on this cache.- Specified by:
 isManagementEnabledin interfaceMicroStreamCacheConfiguration<K,V> - Returns:
 - Whether management is enabled on this cache.
 
 - 
getName
- Specified by:
 getNamein interfaceio.micronaut.core.naming.Named
 - 
setKeyType
- Parameters:
 keyType- The required type of keys for the Cache.
 - 
setValueType
- Parameters:
 valueType- Determines type of values for the Cache.
 - 
setStorage
- Parameters:
 storage- Name qualifier for MicroStream Storage Manager
 - 
setReadThrough
When in "read-through" mode, cache misses that occur due to cache entries not existing as a result of performing a "get" will appropriately cause the configured CacheLoader to be invoked. When you set a Storage Manager, "read-through" mode is activated.- Parameters:
 readThrough- Whether to use "read-through" mode
 - 
setWriteThrough
When in "write-through" mode, cache updates that occur as a result of performing "put" operations will appropriately cause the configured CacheWriter to be invoked.When you set a Storage Manager, "write-through" mode is activated.- Parameters:
 writeThrough- Whether to use "write-through" mode.
 - 
setStoreByValue
When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.- Parameters:
 storeByValue- When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.
 - 
setStatisticsEnabled
Whether statistics collection is enabled in this cache.- Parameters:
 statisticsEnabled- Whether statistics collection is enabled in this cache.
 - 
setManagementEnabled
Whether management is enabled on this cache.- Parameters:
 managementEnabled- Whether management is enabled on this cache.
 - 
isEnabled
public boolean isEnabled()- Specified by:
 isEnabledin interfaceio.micronaut.core.util.Toggleable
 - 
setEnabled
public void setEnabled(boolean enabled) Whether this cache is enabled. Default Value: true- Parameters:
 enabled- Whether this cache is enabled.
 
 -