Class StuckThreadDetectionConfig.BuilderBase<BUILDER extends StuckThreadDetectionConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends StuckThreadDetectionConfig>

java.lang.Object
io.helidon.webserver.StuckThreadDetectionConfig.BuilderBase<BUILDER, PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER, PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Direct Known Subclasses:
StuckThreadDetectionConfig.Builder
Enclosing interface:
StuckThreadDetectionConfig

public abstract static class StuckThreadDetectionConfig.BuilderBase<BUILDER extends StuckThreadDetectionConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends StuckThreadDetectionConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for StuckThreadDetectionConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(StuckThreadDetectionConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(StuckThreadDetectionConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends StuckThreadDetectionConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends StuckThreadDetectionConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      Whether this feature is enabled.
      Parameters:
      enabled - whether enabled, defaults to true
      Returns:
      updated builder instance
      See Also:
    • threshold

      public BUILDER threshold(Duration threshold)
      Minimum time a request must be executing before its thread is reported as stuck. The duration must be positive and representable in nanoseconds.
      Parameters:
      threshold - stuck request threshold, defaults to 10 minutes
      Returns:
      updated builder instance
      See Also:
    • checkPeriod

      public BUILDER checkPeriod(Duration checkPeriod)
      Period between scans of executing request threads. A request becomes eligible after threshold() and is reported on the next scan. The duration must be positive and representable in nanoseconds.
      Parameters:
      checkPeriod - check period, defaults to 1 minute
      Returns:
      updated builder instance
      See Also:
    • weight

      public BUILDER weight(double weight)
      Weight of the feature.
      Parameters:
      weight - feature weight
      Returns:
      updated builder instance
      See Also:
    • clearSockets

      public BUILDER clearSockets()
      Clear all sockets.
      Returns:
      updated builder instance
      See Also:
    • sockets

      public BUILDER sockets(Set<String> sockets)
      List of sockets to register this feature on. If empty, the feature is registered on all sockets.
      Parameters:
      sockets - socket names to register on, defaults to empty (all available sockets)
      Returns:
      updated builder instance
      See Also:
    • addSockets

      public BUILDER addSockets(Set<String> sockets)
      List of sockets to register this feature on. If empty, the feature is registered on all sockets.
      Parameters:
      sockets - socket names to register on, defaults to empty (all available sockets)
      Returns:
      updated builder instance
      See Also:
    • name

      public BUILDER name(String name)
      Name of this feature instance.
      Parameters:
      name - instance name
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      Whether this feature is enabled.
      Returns:
      whether enabled, defaults to true
    • threshold

      public Duration threshold()
      Minimum time a request must be executing before its thread is reported as stuck. The duration must be positive and representable in nanoseconds.
      Returns:
      stuck request threshold, defaults to 10 minutes
    • checkPeriod

      public Duration checkPeriod()
      Period between scans of executing request threads. A request becomes eligible after threshold() and is reported on the next scan. The duration must be positive and representable in nanoseconds.
      Returns:
      check period, defaults to 1 minute
    • weight

      public double weight()
      Weight of the feature.
      Returns:
      feature weight
    • sockets

      public Set<String> sockets()
      List of sockets to register this feature on. If empty, the feature is registered on all sockets.
      Returns:
      socket names to register on, defaults to empty (all available sockets)
    • name

      public String name()
      Name of this feature instance.
      Returns:
      instance name
    • toString

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

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance