Class FixedLimitConfig.Builder
java.lang.Object
io.helidon.common.concurrency.limits.FixedLimitConfig.BuilderBase<FixedLimitConfig.Builder, FixedLimitConfig>
io.helidon.common.concurrency.limits.FixedLimitConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<FixedLimitConfig.Builder, FixedLimitConfig>, Builder<FixedLimitConfig.Builder, FixedLimit>, ConfigBuilderSupport.ConfiguredBuilder<FixedLimitConfig.Builder, FixedLimitConfig>, Supplier<FixedLimit>
- Enclosing interface:
FixedLimitConfig
public static class FixedLimitConfig.Builder
extends FixedLimitConfig.BuilderBase<FixedLimitConfig.Builder, FixedLimitConfig>
implements Builder<FixedLimitConfig.Builder, FixedLimit>
Fluent API builder for
FixedLimit.-
Nested Class Summary
Nested classes/interfaces inherited from class FixedLimitConfig.BuilderBase
FixedLimitConfig.BuilderBase.FixedLimitConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class FixedLimitConfig.BuilderBase
clearClock, clearSemaphore, clock, clock, config, config, enableMetrics, enableMetrics, fair, fair, from, from, name, name, permits, permits, preBuildPrototype, queueLength, queueLength, queueTimeout, queueTimeout, semaphore, semaphore, toString, validatePrototypeModifier and TypeMethodDescriptionClear existing value of clock.Clear existing value of semaphore.clock()A clock that supplies nanosecond time.A clock that supplies nanosecond time.config()Configuration used to configure this instance.Update builder from configuration (node of this type).booleanWhether to collect metrics for the fixed limit implementation.enableMetrics(boolean enableMetrics) Whether to collect metrics for the fixed limit implementation.booleanfair()Whether theSemaphoreshould beSemaphore.isFair().fair(boolean fair) Whether theSemaphoreshould beSemaphore.isFair().from(FixedLimitConfig prototype) Update this builder from an existing prototype instance.from(FixedLimitConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.name()Name of this instance.Name of this instance.intpermits()Number of permits to allow.permits(int permits) Number of permits to allow.protected voidHandles providers and decorators.intHow many requests can be enqueued waiting for a permit.queueLength(int queueLength) How many requests can be enqueued waiting for a permit.How long to wait for a permit when enqueued.queueTimeout(Duration queueTimeout) How long to wait for a permit when enqueued.Explicitly configured semaphore.Explicitly configured semaphore.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault FixedLimitget()default FixedLimitConfig.Builderidentity()Instance of this builder as the correct type.default FixedLimitConfig.Builderupdate(Consumer<FixedLimitConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault FixedLimitConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<FixedLimitConfig.Builder, FixedLimitConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<FixedLimitConfig.Builder, FixedLimit>- Returns:
- instance of the built type
-