Class MicrostreamCacheConfigurationBuilder<K,V>
- java.lang.Object
-
- io.helidon.integrations.microstream.cache.MicrostreamCacheConfigurationBuilder<K,V>
-
- Type Parameters:
K
- type of the cache keyV
- type of the cache value
- All Implemented Interfaces:
Builder<one.microstream.cache.types.CacheConfiguration<K,V>>
,Supplier<one.microstream.cache.types.CacheConfiguration<K,V>>
,one.microstream.cache.types.CacheConfiguration.Builder<K,V>
,one.microstream.cache.types.CacheConfigurationPropertyNames
public class MicrostreamCacheConfigurationBuilder<K,V> extends Object implements one.microstream.cache.types.CacheConfigurationPropertyNames, one.microstream.cache.types.CacheConfiguration.Builder<K,V>, Builder<one.microstream.cache.types.CacheConfiguration<K,V>>
Builder for Microstream-CacheConfigurations.
-
-
Field Summary
-
Fields inherited from interface one.microstream.cache.types.CacheConfigurationPropertyNames
CACHE_LOADER_FACTORY, CACHE_WRITER_FACTORY, EVICTION_MANAGER_FACTORY, EXPIRY_POLICY_FACTORY, KEY_TYPE, MANAGEMENT_ENABLED, READ_THROUGH, STATISTICS_ENABLED, STORAGE, STORAGE_CONFIGURATION_RESOURCE_NAME, STORAGE_KEY, STORE_BY_VALUE, VALUE_TYPE, WRITE_THROUGH
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MicrostreamCacheConfigurationBuilder(Class<K> keyType, Class<V> valueType)
protected
MicrostreamCacheConfigurationBuilder(one.microstream.configuration.types.Configuration configuration, Class<K> keyType, Class<V> valueType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description one.microstream.cache.types.CacheConfiguration.Builder<K,V>
addListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> listenerConfiguration)
one.microstream.cache.types.CacheConfiguration<K,V>
build()
Build the instance from this builder.static MicrostreamCacheConfigurationBuilder<?,?>
builder(Config config)
creates a new MicrostreamCacheConfigurationBuilder using the supplied helidon configuration.static <K,V>
MicrostreamCacheConfigurationBuilder<K,V>builder(Config config, Class<K> keyType, Class<V> valueType)
Create a CacheConfiguration builder initialized from the supplied helidon configuration node.static <K,V>
MicrostreamCacheConfigurationBuilder<K,V>builder(Class<K> keyType, Class<V> valueType)
Create a CacheConfiguration builder with default values.MicrostreamCacheConfigurationBuilder<K,V>
cacheLoaderFactory(javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)
MicrostreamCacheConfigurationBuilder<K,V>
cacheWriterFactory(javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)
MicrostreamCacheConfigurationBuilder<K,V>
enableManagement(boolean enableManagement)
MicrostreamCacheConfigurationBuilder<K,V>
enableStatistics(boolean enableStatistics)
MicrostreamCacheConfigurationBuilder<K,V>
evictionManagerFactory(javax.cache.configuration.Factory<one.microstream.cache.types.EvictionManager<K,V>> evictionManagerFactory)
MicrostreamCacheConfigurationBuilder<K,V>
expiryPolicyFactory(javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
MicrostreamCacheConfigurationBuilder<K,V>
readThrough(boolean readTrough)
MicrostreamCacheConfigurationBuilder<K,V>
serializerFieldPredicate(Predicate<? super Field> serializerFieldPredicate)
MicrostreamCacheConfigurationBuilder<K,V>
storeByValue(boolean storeByValue)
MicrostreamCacheConfigurationBuilder<K,V>
writeThrough(boolean writeThrough)
-
-
-
Method Detail
-
builder
public static MicrostreamCacheConfigurationBuilder<?,?> builder(Config config)
creates a new MicrostreamCacheConfigurationBuilder using the supplied helidon configuration.- Parameters:
config
- helidon configuration- Returns:
- a new MicrostreamCacheConfigurationBuilder
-
builder
public static <K,V> MicrostreamCacheConfigurationBuilder<K,V> builder(Class<K> keyType, Class<V> valueType)
Create a CacheConfiguration builder with default values.- Type Parameters:
K
- type of the cache keyV
- type of the cache value- Parameters:
keyType
- type of the cache keyvalueType
- type of the cache value- Returns:
- a new CacheConfiguration builder
-
builder
public static <K,V> MicrostreamCacheConfigurationBuilder<K,V> builder(Config config, Class<K> keyType, Class<V> valueType)
Create a CacheConfiguration builder initialized from the supplied helidon configuration node.- Type Parameters:
K
- type of the cache keyV
- type of the cache value- Parameters:
config
- helidon configuationkeyType
- type of the cache keyvalueType
- type of the cache value- Returns:
- a new CacheConfiguration builder
-
build
public one.microstream.cache.types.CacheConfiguration<K,V> build()
Description copied from interface:Builder
Build the instance from this builder.
-
readThrough
public MicrostreamCacheConfigurationBuilder<K,V> readThrough(boolean readTrough)
-
writeThrough
public MicrostreamCacheConfigurationBuilder<K,V> writeThrough(boolean writeThrough)
-
storeByValue
public MicrostreamCacheConfigurationBuilder<K,V> storeByValue(boolean storeByValue)
-
enableStatistics
public MicrostreamCacheConfigurationBuilder<K,V> enableStatistics(boolean enableStatistics)
-
enableManagement
public MicrostreamCacheConfigurationBuilder<K,V> enableManagement(boolean enableManagement)
-
expiryPolicyFactory
public MicrostreamCacheConfigurationBuilder<K,V> expiryPolicyFactory(javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
-
evictionManagerFactory
public MicrostreamCacheConfigurationBuilder<K,V> evictionManagerFactory(javax.cache.configuration.Factory<one.microstream.cache.types.EvictionManager<K,V>> evictionManagerFactory)
-
cacheLoaderFactory
public MicrostreamCacheConfigurationBuilder<K,V> cacheLoaderFactory(javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)
-
cacheWriterFactory
public MicrostreamCacheConfigurationBuilder<K,V> cacheWriterFactory(javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)
-
serializerFieldPredicate
public MicrostreamCacheConfigurationBuilder<K,V> serializerFieldPredicate(Predicate<? super Field> serializerFieldPredicate)
-
-