Interface AsyncConfig
- All Superinterfaces:
Prototype.Api, Prototype.Factory<Async>
- All Known Implementing Classes:
AsyncConfig.BuilderBase.AsyncConfigImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forAsync.static classAsyncConfig.BuilderBase<BUILDER extends AsyncConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends AsyncConfig>Fluent API builder base forAsyncConfig. -
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static AsyncConfig.Builderbuilder(AsyncConfig instance) Create a new fluent API builder from an existing instance.static AsyncConfigcreate()Create a new instance with default values.static AsyncConfigCreate a new instance from configuration.executor()Executor service.Name of an executor service.name()Name for debugging, error reporting, monitoring.onStart()A future that is completed when execution of the asynchronous task starts.Methods inherited from interface Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
-
name
-
executorName
Name of an executor service. This is only honored when service registry is used.- Returns:
- name fo the
ExecutorServiceto lookup - See Also:
-
executor
Optional<ExecutorService> executor()Executor service. Will be used to run the asynchronous tasks.- Returns:
- explicit executor service
-
onStart
Optional<CompletableFuture<Async>> onStart()A future that is completed when execution of the asynchronous task starts.- Returns:
- future that will be completed by the asynchronous processing
-