public class BlockingCode
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static BlockingCode |
forVertx(org.vertx.java.core.Vertx v)
Creates a BlockingCode executor to use in a vertx event loop.
|
<T> java.util.concurrent.CompletableFuture<T> |
run(java.util.function.Supplier<T> supplier)
Returns a future that will execute its followers in the vertx context
associated with this instance
|
BlockingCode |
withExecutor(java.util.concurrent.ExecutorService pool)
Provide your own executor where the blocking code will run.
|
public BlockingCode withExecutor(java.util.concurrent.ExecutorService pool)
pool
- public static BlockingCode forVertx(org.vertx.java.core.Vertx v)
VertxPlatform.getVertx()
but
with the vertx instance from your verticlev
- public <T> java.util.concurrent.CompletableFuture<T> run(java.util.function.Supplier<T> supplier)
supplier
- Copyright © 2021. All Rights Reserved.