Class CacheConfig.BuilderBase<BUILDER extends CacheConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CacheConfig>
java.lang.Object
io.helidon.discovery.providers.eureka.CacheConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
CacheConfig.Builder
- Enclosing interface:
CacheConfig
public abstract static class CacheConfig.BuilderBase<BUILDER extends CacheConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CacheConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
CacheConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the state of the cache should be computed from changes reported by Eureka, or replaced in full;trueby default.computeChanges(boolean computeChanges) Whether the state of the cache should be computed from changes reported by Eureka, or replaced in full;trueby default.config()If this instance was configured, this would be the config instance used.Deprecated.Update builder from configuration (node of this type).booleanWhether to defer immediate cache synchronization;falseby default.deferSync(boolean deferSync) Whether to defer immediate cache synchronization;falseby default.booleanenabled()Whether a local cache of Eureka information is used or not;trueby default.enabled(boolean enabled) Whether a local cache of Eureka information is used or not;trueby default.The name of theThreadused to retrieve service information from the Eureka server; "Eureka registry fetch thread" by default.fetchThreadName(String fetchThreadName) The name of theThreadused to retrieve service information from the Eureka server; "Eureka registry fetch thread" by default.from(CacheConfig prototype) Update this builder from an existing prototype instance.from(CacheConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.protected voidHandles providers and decorators.The time between retrievals of service information from the Eureka server; 30 seconds by default.syncInterval(Duration syncInterval) The time between retrievals of service information from the Eureka server; 30 seconds by default.toString()protected voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends CacheConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends CacheConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends CacheConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends CacheConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
computeChanges
Whether the state of the cache should be computed from changes reported by Eureka, or replaced in full;trueby default.- Parameters:
computeChanges- whether the state of the cache should be computed- Returns:
- updated builder instance
- See Also:
-
deferSync
Whether to defer immediate cache synchronization;falseby default.- Parameters:
deferSync-trueif cache synchronization should be deferred until it is actually needed- Returns:
- updated builder instance
- See Also:
-
enabled
Whether a local cache of Eureka information is used or not;trueby default.- Parameters:
enabled-trueif the cache should be used- Returns:
- updated builder instance
- See Also:
-
fetchThreadName
The name of theThreadused to retrieve service information from the Eureka server; "Eureka registry fetch thread" by default.- Parameters:
fetchThreadName- the name of theThreadused to retrieve service information from the Eureka server- Returns:
- updated builder instance
- See Also:
-
syncInterval
The time between retrievals of service information from the Eureka server; 30 seconds by default.- Parameters:
syncInterval- the time between retrievals of service information from the Eureka server- Returns:
- updated builder instance
- See Also:
-
computeChanges
public boolean computeChanges()Whether the state of the cache should be computed from changes reported by Eureka, or replaced in full;trueby default.- Returns:
- the compute changes
-
deferSync
public boolean deferSync()Whether to defer immediate cache synchronization;falseby default.- Returns:
- the defer sync
-
enabled
public boolean enabled()Whether a local cache of Eureka information is used or not;trueby default.- Returns:
- the enabled
-
fetchThreadName
The name of theThreadused to retrieve service information from the Eureka server; "Eureka registry fetch thread" by default.- Returns:
- the fetch thread name
- See Also:
-
syncInterval
The time between retrievals of service information from the Eureka server; 30 seconds by default.- Returns:
- the sync interval
- See Also:
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
config(io.helidon.config.Config)