Class MicrostreamCacheConfigurationBuilder<K,​V>

  • Type Parameters:
    K - type of the cache key
    V - 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.
    • Constructor Detail

      • MicrostreamCacheConfigurationBuilder

        protected MicrostreamCacheConfigurationBuilder​(Class<K> keyType,
                                                       Class<V> valueType)
      • MicrostreamCacheConfigurationBuilder

        protected MicrostreamCacheConfigurationBuilder​(one.microstream.configuration.types.Configuration configuration,
                                                       Class<K> keyType,
                                                       Class<V> valueType)
    • 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 key
        V - type of the cache value
        Parameters:
        keyType - type of the cache key
        valueType - 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 key
        V - type of the cache value
        Parameters:
        config - helidon configuation
        keyType - type of the cache key
        valueType - 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.
        Specified by:
        build in interface Builder<K>
        Specified by:
        build in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
        Returns:
        instance of the built type
      • readThrough

        public MicrostreamCacheConfigurationBuilder<K,​V> readThrough​(boolean readTrough)
        Specified by:
        readThrough in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • writeThrough

        public MicrostreamCacheConfigurationBuilder<K,​V> writeThrough​(boolean writeThrough)
        Specified by:
        writeThrough in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • storeByValue

        public MicrostreamCacheConfigurationBuilder<K,​V> storeByValue​(boolean storeByValue)
        Specified by:
        storeByValue in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • enableStatistics

        public MicrostreamCacheConfigurationBuilder<K,​V> enableStatistics​(boolean enableStatistics)
        Specified by:
        enableStatistics in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • enableManagement

        public MicrostreamCacheConfigurationBuilder<K,​V> enableManagement​(boolean enableManagement)
        Specified by:
        enableManagement in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • expiryPolicyFactory

        public MicrostreamCacheConfigurationBuilder<K,​V> expiryPolicyFactory​(javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
        Specified by:
        expiryPolicyFactory in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • evictionManagerFactory

        public MicrostreamCacheConfigurationBuilder<K,​V> evictionManagerFactory​(javax.cache.configuration.Factory<one.microstream.cache.types.EvictionManager<K,​V>> evictionManagerFactory)
        Specified by:
        evictionManagerFactory in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • cacheLoaderFactory

        public MicrostreamCacheConfigurationBuilder<K,​V> cacheLoaderFactory​(javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,​V>> cacheLoaderFactory)
        Specified by:
        cacheLoaderFactory in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • cacheWriterFactory

        public MicrostreamCacheConfigurationBuilder<K,​V> cacheWriterFactory​(javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,​? super V>> cacheWriterFactory)
        Specified by:
        cacheWriterFactory in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • serializerFieldPredicate

        public MicrostreamCacheConfigurationBuilder<K,​V> serializerFieldPredicate​(Predicate<? super Field> serializerFieldPredicate)
        Specified by:
        serializerFieldPredicate in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>
      • addListenerConfiguration

        public one.microstream.cache.types.CacheConfiguration.Builder<K,​V> addListenerConfiguration​(javax.cache.configuration.CacheEntryListenerConfiguration<K,​V> listenerConfiguration)
        Specified by:
        addListenerConfiguration in interface one.microstream.cache.types.CacheConfiguration.Builder<K,​V>