Class TimeoutConfig.BuilderBase.TimeoutConfigImpl

java.lang.Object
io.helidon.faulttolerance.TimeoutConfig.BuilderBase.TimeoutConfigImpl
All Implemented Interfaces:
Prototype.Api, Prototype.Factory<Timeout>, TimeoutConfig, Supplier<Timeout>
Enclosing class:
TimeoutConfig.BuilderBase<BUILDER extends TimeoutConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends TimeoutConfig>

protected static class TimeoutConfig.BuilderBase.TimeoutConfigImpl extends Object implements TimeoutConfig, Supplier<Timeout>
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • TimeoutConfigImpl

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

    • build

      public Timeout build()
      Description copied from interface: Prototype.Factory
      Create a new instance of the runtime type from this config object.
      Specified by:
      build in interface Prototype.Factory<Timeout>
      Returns:
      new configured runtime instance
    • get

      public Timeout get()
      Specified by:
      get in interface Supplier<Timeout>
    • name

      public Optional<String> name()
      Description copied from interface: TimeoutConfig
      Name for debugging, error reporting, monitoring.
      Specified by:
      name in interface TimeoutConfig
      Returns:
      name of this timeout
    • timeout

      public Duration timeout()
      Description copied from interface: TimeoutConfig
      Duration to wait before timing out. Defaults to 10 seconds.
      Specified by:
      timeout in interface TimeoutConfig
      Returns:
      timeout
    • currentThread

      public boolean currentThread()
      Description copied from interface: TimeoutConfig
      Flag to indicate that code must be executed in current thread instead of in an executor's thread. This flag is false by default.
      Specified by:
      currentThread in interface TimeoutConfig
      Returns:
      whether to execute on current thread (true), or in an executor service (false})
    • executor

      public Optional<ExecutorService> executor()
      Description copied from interface: TimeoutConfig
      Executor service to schedule the timeout.
      Specified by:
      executor in interface TimeoutConfig
      Returns:
      executor service to use
    • enableMetrics

      public boolean enableMetrics()
      Description copied from interface: TimeoutConfig
      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 TimeoutConfig
      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