Module io.helidon.faulttolerance
Package io.helidon.faulttolerance
Class BulkheadConfig.BuilderBase.BulkheadConfigImpl
java.lang.Object
io.helidon.faulttolerance.BulkheadConfig.BuilderBase.BulkheadConfigImpl
- All Implemented Interfaces:
Prototype.Api,Prototype.Factory<Bulkhead>,BulkheadConfig,Supplier<Bulkhead>
- Enclosing class:
BulkheadConfig.BuilderBase<BUILDER extends BulkheadConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends BulkheadConfig>
protected static class BulkheadConfig.BuilderBase.BulkheadConfigImpl
extends Object
implements BulkheadConfig, Supplier<Bulkhead>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.faulttolerance.BulkheadConfig
BulkheadConfig.Builder, BulkheadConfig.BuilderBase<BUILDER extends BulkheadConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends BulkheadConfig> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault limit.static final intDefault queue lengths. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBulkheadConfigImpl(BulkheadConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create a new instance of the runtime type from this config object.booleanFlag to enable metrics for this instance.booleanget()inthashCode()intlimit()Maximal number of parallel requests going through this bulkhead.name()Name for debugging, error reporting, monitoring.intMaximal number of enqueued requests waiting for processing.Queue listeners of this bulkhead.toString()
-
Field Details
-
DEFAULT_LIMIT
static final int DEFAULT_LIMITDefault limit.- See Also:
-
DEFAULT_QUEUE_LENGTH
static final int DEFAULT_QUEUE_LENGTHDefault queue lengths.- See Also:
-
-
Constructor Details
-
BulkheadConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
build
Description copied from interface:Prototype.FactoryCreate a new instance of the runtime type from this config object.- Specified by:
buildin interfacePrototype.Factory<Bulkhead>- Returns:
- new configured runtime instance
-
get
-
limit
public int limit()Description copied from interface:BulkheadConfigMaximal number of parallel requests going through this bulkhead. When the limit is reached, additional requests are enqueued.- Specified by:
limitin interfaceBulkheadConfig- Returns:
- maximal number of parallel calls, defaults is 10
-
queueLength
public int queueLength()Description copied from interface:BulkheadConfigMaximal number of enqueued requests waiting for processing. When the limit is reached, additional attempts to invoke a request will receive aBulkheadException.- Specified by:
queueLengthin interfaceBulkheadConfig- Returns:
- length of the queue
-
queueListeners
Description copied from interface:BulkheadConfigQueue listeners of this bulkhead.- Specified by:
queueListenersin interfaceBulkheadConfig- Returns:
- queue listeners
-
name
Description copied from interface:BulkheadConfigName for debugging, error reporting, monitoring.- Specified by:
namein interfaceBulkheadConfig- Returns:
- name of this bulkhead
-
enableMetrics
public boolean enableMetrics()Description copied from interface:BulkheadConfigFlag to enable metrics for this instance. The value of this flag is combined with the global config entryFaultTolerance.FT_METRICS_DEFAULT_ENABLED. If either of these flags istrue, then metrics will be enabled for the instance.- Specified by:
enableMetricsin interfaceBulkheadConfig- Returns:
- metrics enabled flag
-
toString
-
equals
-
hashCode
public int hashCode()
-