Package io.helidon.common.configurable
Interface LruCacheConfig<K,V>
- Type Parameters:
K
- type of keysV
- type of values
- All Superinterfaces:
Prototype.Api
,Prototype.Factory<LruCache<K,
V>>
- All Known Implementing Classes:
LruCacheConfig.BuilderBase.LruCacheConfigImpl
Configuration of a LRU Cache.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forLruCache
.static class
LruCacheConfig.BuilderBase<K,
V, BUILDER extends LruCacheConfig.BuilderBase<K, V, BUILDER, PROTOTYPE>, PROTOTYPE extends LruCacheConfig<K, V>> Fluent API builder base forLruCache
. -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> LruCacheConfig.Builder <K, V> builder()
Create a new fluent API builder to customize configuration.static <K,
V> LruCacheConfig.Builder <K, V> builder
(LruCacheConfig<K, V> instance) Create a new fluent API builder from an existing instance.int
capacity()
Configure capacity of the cache.static <K,
V> LruCacheConfig <K, V> create()
Create a new instance with default values.static <K,
V> LruCacheConfig <K, V> Create a new instance from configuration.Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Type Parameters:
K
- type of keysV
- type of values- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Type Parameters:
K
- type of keysV
- type of values- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Type Parameters:
K
- type of keysV
- type of values- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Type Parameters:
K
- type of keysV
- type of values- Returns:
- a new instance
-
capacity
int capacity()- Returns:
- maximal number of records in the cache before the oldest one is removed
-