Package net.bluemind.lib.vertx
Class BlockingCode
java.lang.Object
net.bluemind.lib.vertx.BlockingCode
Deprecated.
Helper inspired by vertx 3 to run blocking code from an event loop context.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BlockingCode
forVertx
(io.vertx.core.Vertx v) Deprecated.Creates a BlockingCode executor to use in a vertx event loop.<T> CompletableFuture
<T> Deprecated.Returns a future that will execute its followers in the vertx context associated with this instancewithExecutor
(ExecutorService pool) Deprecated.the executor is not used anymore
-
Method Details
-
withExecutor
Deprecated.the executor is not used anymoreProvide your own executor where the blocking code will run.- Parameters:
pool
-- Returns:
-
forVertx
Deprecated.Creates a BlockingCode executor to use in a vertx event loop. DISCLAIMER: Do not call that withVertxPlatform.getVertx()
but with the vertx instance from your verticle- Parameters:
v
-- Returns:
-
run
Deprecated.Returns a future that will execute its followers in the vertx context associated with this instance- Parameters:
supplier
-- Returns:
- a future for with the result of the given supplier
-
Vertx.executeBlocking(io.vertx.core.Handler, io.vertx.core.Handler)
instead