java.lang.Object
io.helidon.faulttolerance.Timeout.Builder
- All Implemented Interfaces:
Builder<Timeout.Builder,
,Timeout> Supplier<Timeout>
- Enclosing interface:
- Timeout
Fluent API builder for
Timeout
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the instance from this builder.cancelSource
(boolean cancelSource) Cancel source if destination stage is cancelled.Load all properties for this circuit breaker from configuration.currentThread
(boolean currentThread) Flag to indicate that code must be executed in current thread instead of in an executor's thread.executor
(ScheduledExecutorService executor) Executor service to schedule the timeout.A name assigned for debugging, error reporting or configuration purposes.Timeout duration.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<Timeout.Builder,
Timeout> - Returns:
- instance of the built type
-
timeout
Timeout duration.- Parameters:
timeout
- duration of the timeout of operations handled by the new Timeout instance- Returns:
- updated builder instance
-
currentThread
Flag to indicate that code must be executed in current thread instead of in an executor's thread. This flag isfalse
by default.- Parameters:
currentThread
- setting for this timeout- Returns:
- updated builder instance
-
executor
Executor service to schedule the timeout.- Parameters:
executor
- scheduled executor service to use- Returns:
- updated builder instance
-
name
A name assigned for debugging, error reporting or configuration purposes.- Parameters:
name
- the name- Returns:
- updated builder instance
-
cancelSource
Cancel source if destination stage is cancelled.- Parameters:
cancelSource
- setting for cancel source, defaults (@code true}- Returns:
- updated builder instance
-
config
Load all properties for this circuit breaker from configuration.
Configuration key default value description timeout 10 seconds Length of timeout current-thread false Control that task is executed in calling thread name Timeout-N Name used for debugging cancel-source true Cancel task source if task is cancelled - Parameters:
config
- the config node to use- Returns:
- updated builder instance
-