Class CacheBuilder<K,V>
- java.lang.Object
-
- io.helidon.integrations.microstream.cache.CacheBuilder<K,V>
-
- Type Parameters:
K
- type of the cache keyV
- 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
All Methods Static Methods Instance Methods Concrete Methods 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.
-
-
-
Method Detail
-
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 keyV
- type of the cache value- Parameters:
configuration
- CacheConfigurationkeyType
- class of the cache keyvalueType
- 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 nameconfig
- the helidon configurationkeyType
- class of the cache keyvalueType
- class of the cache key- Returns:
- the new cache instance
-
-