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.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:BuilderBuild the instance from this builder.- Specified by:
buildin 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 isfalseby 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
-