@Factory
public class CacheFactory
extends java.lang.Object
| Constructor and Description |
|---|
CacheFactory(io.micronaut.core.convert.ConversionService<?> conversionService)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<K,V> MicroStreamSyncCache<K,V> |
createCache(java.lang.String name,
one.microstream.cache.types.CacheConfiguration.Builder<K,V> cacheConfigurationBuilder,
java.util.concurrent.ExecutorService executorService)
Create a cache for each CacheConfiguration.
|
public CacheFactory(io.micronaut.core.convert.ConversionService<?> conversionService)
conversionService - The conversion service@Singleton @Bean(preDestroy="close") @EachBean(value=one.microstream.cache.types.CacheConfiguration.Builder.class) public <K,V> MicroStreamSyncCache<K,V> createCache(@Parameter java.lang.String name, one.microstream.cache.types.CacheConfiguration.Builder<K,V> cacheConfigurationBuilder, @Named(value="io") java.util.concurrent.ExecutorService executorService)
K - The key typeV - The key typename - The name of the cachecacheConfigurationBuilder - Cache Configuration BuilderexecutorService - The IO executor service for async caches