- All Superinterfaces:
- RuntimeType.Api<AsyncConfig>
Runs synchronous suppliers asynchronously using virtual threads. Includes
 convenient static method to avoid creating instances of this class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic AsyncConfig.Builderbuilder()Create a new fluent API builder for async.static Asynccreate()Async with default executor service.static Asynccreate(AsyncConfig config) Async with explicit configuration.static Asynccreate(Consumer<AsyncConfig.Builder> builderConsumer) Create a new Async customizing its configuration.<T> CompletableFuture<T> Invoke a synchronous operation asynchronously.static <T> CompletableFuture<T> invokeStatic(Supplier<T> supplier) Convenience method to avoid having to callcreate().static <T> CompletableFuture<T> invokeStatic(Supplier<T> supplier, CompletableFuture<Async> onStart) Convenience method to avoid having to callcreate().Methods inherited from interface io.helidon.builder.api.RuntimeType.Apiprototype
- 
Method Details- 
createAsync with default executor service.- Returns:
- a default async instance
 
- 
createAsync with explicit configuration.- Parameters:
- config- async configuration
- Returns:
- a default async instance
 
- 
createCreate a new Async customizing its configuration.- Parameters:
- builderConsumer- consumer of async configuration
- Returns:
- a new async
 
- 
builderCreate a new fluent API builder for async.- Returns:
- a new builder
 
- 
invokeStaticConvenience method to avoid having to callcreate().- Type Parameters:
- T- type of returned value
- Parameters:
- supplier- supplier of value (or a method reference)
- Returns:
- a Single that is a "promise" of the future result
 
- 
invokeStaticstatic <T> CompletableFuture<T> invokeStatic(Supplier<T> supplier, CompletableFuture<Async> onStart) Convenience method to avoid having to callcreate(). Also accepts anonStartfuture to inform of async task startup.- Type Parameters:
- T- type of returned value
- Parameters:
- supplier- supplier of value (or a method reference)
- onStart- future completed when async task starts
- Returns:
- a future that is a "promise" of the future result
 
- 
invokeInvoke a synchronous operation asynchronously. This method never throws an exception. Any exception is returned via theCompletableFutureresult.- Type Parameters:
- T- type of returned value
- Parameters:
- supplier- supplier of value (or a method reference)
- Returns:
- a Single that is a "promise" of the future result
 
 
-