java.lang.Object
io.helidon.integrations.microstream.cache.CacheBuilder<K,V>
Type Parameters:
K - type of the cache key
V - type of the cache value

public class CacheBuilder<K,V> extends Object
Builder for a Microstream - JCache instance.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CacheBuilder(Class<K> keyType, Class<V> valueType)
     
    protected
    CacheBuilder(one.microstream.cache.types.CacheConfiguration<K,V> configuration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    one.microstream.cache.types.Cache<K,V>
    build(String name)
    Set the name of the cache.
    static <K, V> CacheBuilder<K,V>
    builder(one.microstream.cache.types.CacheConfiguration<K,V> configuration, Class<K> keyType, Class<V> valueType)
    Create a new cache builder using the provided microstream cache configuration.
    static one.microstream.cache.types.Cache<?,?>
    create(String name, Config config, Class<?> keyType, Class<?> valueType)
    Create a named cache using the provided helidon configuration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CacheBuilder

      protected CacheBuilder(one.microstream.cache.types.CacheConfiguration<K,V> configuration)
    • CacheBuilder

      protected CacheBuilder(Class<K> keyType, Class<V> valueType)
  • Method Details

    • builder

      public static <K, V> CacheBuilder<K,V> builder(one.microstream.cache.types.CacheConfiguration<K,V> configuration, Class<K> keyType, Class<V> valueType)
      Create a new cache builder using the provided microstream cache configuration.
      Type Parameters:
      K - type of the cache key
      V - type of the cache value
      Parameters:
      configuration - CacheConfiguration
      keyType - class of the cache key
      valueType - class of the cache key
      Returns:
      cache builder
    • build

      public one.microstream.cache.types.Cache<K,V> build(String name)
      Set the name of the cache.
      Parameters:
      name - the cache name
      Returns:
      the new cache instance
    • create

      public static one.microstream.cache.types.Cache<?,?> create(String name, Config config, Class<?> keyType, Class<?> valueType)
      Create a named cache using the provided helidon configuration.
      Parameters:
      name - the cache name
      config - the helidon configuration
      keyType - class of the cache key
      valueType - class of the cache key
      Returns:
      the new cache instance