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
Builder for a Microstream - JCache instance.
-
Constructor Summary
ModifierConstructorDescriptionprotected
CacheBuilder
(Class<K> keyType, Class<V> valueType) protected
CacheBuilder
(one.microstream.cache.types.CacheConfiguration<K, V> configuration) -
Method Summary
Modifier and TypeMethodDescriptionSet 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 a named cache using the provided helidon configuration.
-
Constructor Details
-
CacheBuilder
-
CacheBuilder
-
-
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 keyV
- type of the cache value- Parameters:
configuration
- CacheConfigurationkeyType
- class of the cache keyvalueType
- class of the cache key- Returns:
- cache builder
-
build
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
-