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 int
Default limit.static final int
Default queue lengths. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BulkheadConfigImpl
(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.boolean
Flag to enable metrics for this instance.boolean
get()
int
hashCode()
int
limit()
Maximal number of parallel requests going through this bulkhead.name()
Name for debugging, error reporting, monitoring.int
Maximal 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.Factory
Create a new instance of the runtime type from this config object.- Specified by:
build
in interfacePrototype.Factory<Bulkhead>
- Returns:
- new configured runtime instance
-
get
-
limit
public int limit()Description copied from interface:BulkheadConfig
Maximal number of parallel requests going through this bulkhead. When the limit is reached, additional requests are enqueued.- Specified by:
limit
in interfaceBulkheadConfig
- Returns:
- maximal number of parallel calls, defaults is 10
-
queueLength
public int queueLength()Description copied from interface:BulkheadConfig
Maximal number of enqueued requests waiting for processing. When the limit is reached, additional attempts to invoke a request will receive aBulkheadException
.- Specified by:
queueLength
in interfaceBulkheadConfig
- Returns:
- length of the queue
-
queueListeners
Description copied from interface:BulkheadConfig
Queue listeners of this bulkhead.- Specified by:
queueListeners
in interfaceBulkheadConfig
- Returns:
- queue listeners
-
name
Description copied from interface:BulkheadConfig
Name for debugging, error reporting, monitoring.- Specified by:
name
in interfaceBulkheadConfig
- Returns:
- name of this bulkhead
-
enableMetrics
public boolean enableMetrics()Description copied from interface:BulkheadConfig
Flag 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:
enableMetrics
in interfaceBulkheadConfig
- Returns:
- metrics enabled flag
-
toString
-
equals
-
hashCode
public int hashCode()
-