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.
  • Field Details

  • Constructor Details

    • BulkheadConfigImpl

      protected BulkheadConfigImpl(BulkheadConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • build

      public Bulkhead build()
      Create a new runtime instance from this prototype.
      Specified by:
      build in interface Prototype.Factory<Bulkhead>
      Returns:
      new configured runtime instance
    • get

      public Bulkhead get()
      Specified by:
      get in interface Supplier<Bulkhead>
    • 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 interface BulkheadConfig
      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 a BulkheadException.
      Specified by:
      queueLength in interface BulkheadConfig
      Returns:
      length of the queue
    • queueListeners

      public List<Bulkhead.QueueListener> queueListeners()
      Description copied from interface: BulkheadConfig
      Queue listeners of this bulkhead.
      Specified by:
      queueListeners in interface BulkheadConfig
      Returns:
      queue listeners
    • name

      public Optional<String> name()
      Description copied from interface: BulkheadConfig
      Name for debugging, error reporting, monitoring.
      Specified by:
      name in interface BulkheadConfig
      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 entry FaultTolerance.FT_METRICS_DEFAULT_ENABLED. If either of these flags is true, then metrics will be enabled for the instance.
      Specified by:
      enableMetrics in interface BulkheadConfig
      Returns:
      metrics enabled flag
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object