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.Builder,LruCacheConfig.BuilderBase,LruCacheConfig.BuilderBase.LruCacheConfigImpl
Configuration of a LRU Cache.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forLruCache.static classLruCacheConfig.BuilderBase<K,V, BUILDER extends LruCacheConfig.BuilderBase<K, V, BUILDER, PROTOTYPE>, PROTOTYPE extends LruCacheConfig<K, V>> Fluent API builder base forLruCache. -
Field Summary
Fields -
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.intcapacity()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
-
Field Details
-
DEFAULT_CAPACITY
- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- 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.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
capacity
int capacity()Configure capacity of the cache. Defaults to "10000".- Returns:
- maximal number of records in the cache before the oldest one is removed
-