Module io.helidon.faulttolerance
Package io.helidon.faulttolerance
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.faulttolerance.TimeoutConfig
TimeoutConfig.Builder, TimeoutConfig.BuilderBase<BUILDER extends TimeoutConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends TimeoutConfig> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TimeoutConfigImpl
(TimeoutConfig.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 indicate that code must be executed in current thread instead of in an executor's thread.boolean
Flag to enable metrics for this instance.boolean
executor()
Executor service to schedule the timeout.get()
int
hashCode()
name()
Name for debugging, error reporting, monitoring.timeout()
Duration to wait before timing out.toString()
-
Constructor Details
-
TimeoutConfigImpl
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<Timeout>
- Returns:
- new configured runtime instance
-
get
-
name
Description copied from interface:TimeoutConfig
Name for debugging, error reporting, monitoring.- Specified by:
name
in interfaceTimeoutConfig
- Returns:
- name of this timeout
-
timeout
Description copied from interface:TimeoutConfig
Duration to wait before timing out. Defaults to10 seconds
.- Specified by:
timeout
in interfaceTimeoutConfig
- 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 isfalse
by default.- Specified by:
currentThread
in interfaceTimeoutConfig
- Returns:
- whether to execute on current thread (
true
), or in an executor service (false
})
-
executor
Description copied from interface:TimeoutConfig
Executor service to schedule the timeout.- Specified by:
executor
in interfaceTimeoutConfig
- 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 entryFaultTolerance.FT_METRICS_DEFAULT_ENABLED
. If either of these flags istrue
, then metrics will be enabled for the instance.- Specified by:
enableMetrics
in interfaceTimeoutConfig
- Returns:
- metrics enabled flag
-
toString
-
equals
-
hashCode
public int hashCode()
-