Class MemoryCacheConfig.BuilderBase.MemoryCacheConfigImpl
java.lang.Object
io.helidon.webserver.staticcontent.MemoryCacheConfig.BuilderBase.MemoryCacheConfigImpl
- All Implemented Interfaces:
Prototype.Api, Prototype.Factory<MemoryCache>, MemoryCacheConfig, Supplier<MemoryCache>
- Enclosing class:
MemoryCacheConfig.BuilderBase<BUILDER extends MemoryCacheConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends MemoryCacheConfig>
protected static class MemoryCacheConfig.BuilderBase.MemoryCacheConfigImpl
extends Object
implements MemoryCacheConfig, Supplier<MemoryCache>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MemoryCacheConfig
MemoryCacheConfig.Builder, MemoryCacheConfig.BuilderBase<BUILDER, PROTOTYPE>Modifier and TypeInterfaceDescriptionstatic classFluent API builder forMemoryCache.static classMemoryCacheConfig.BuilderBase<BUILDER extends MemoryCacheConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends MemoryCacheConfig>Fluent API builder base forMemoryCacheConfig. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMemoryCacheConfigImpl(MemoryCacheConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
-
Constructor Details
-
MemoryCacheConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
build
Create a new runtime instance from this prototype.- Specified by:
buildin interfacePrototype.Factory<MemoryCache>- Returns:
- new configured runtime instance
-
get
- Specified by:
getin interfaceSupplier<MemoryCache>
-
enabled
public boolean enabled()Description copied from interface:MemoryCacheConfigWhether the cache is enabled, defaults totrue.- Specified by:
enabledin interfaceMemoryCacheConfig- Returns:
- whether the cache is enabled
-
capacity
Description copied from interface:MemoryCacheConfigCapacity of the cached bytes of file content. If set to0, the cache is unlimited. To disable caching, setMemoryCacheConfig.enabled()tofalse, or do not configure a memory cache at all.The capacity must be less than
Long.MAX_VALUEbytes, though you must be careful still, as it must fit into the heap size.- Specified by:
capacityin interfaceMemoryCacheConfig- Returns:
- capacity of the cache in bytes, defaults to 50 million bytes (50 mB)
-
toString
-
equals
-
hashCode
-