Interface BulkheadConfig
- All Superinterfaces:
Prototype.Api, Prototype.Factory<Bulkhead>
- All Known Implementing Classes:
BulkheadConfig.BuilderBase.BulkheadConfigImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forBulkhead.static classBulkheadConfig.BuilderBase<BUILDER extends BulkheadConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends BulkheadConfig>Fluent API builder base forBulkheadConfig. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault limit.static final intDefault queue lengths. -
Method Summary
Modifier and TypeMethodDescriptionstatic BulkheadConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static BulkheadConfig.Builderbuilder(BulkheadConfig instance) Create a new fluent API builder from an existing instance.static BulkheadConfigcreate()Create a new instance with default values.static BulkheadConfigCreate a new instance from configuration.booleanFlag to enable metrics for this instance.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.Methods inherited from interface Prototype.Factory
build
-
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:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
-
limit
int limit()Maximal number of parallel requests going through this bulkhead. When the limit is reached, additional requests are enqueued.- Returns:
- maximal number of parallel calls, defaults is 10
-
queueLength
int queueLength()Maximal number of enqueued requests waiting for processing. When the limit is reached, additional attempts to invoke a request will receive aBulkheadException.- Returns:
- length of the queue
-
queueListeners
List<Bulkhead.QueueListener> queueListeners()Queue listeners of this bulkhead.- Returns:
- queue listeners
-
name
-
enableMetrics
boolean enableMetrics()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.- Returns:
- metrics enabled flag
-