public class MutinyHelper extends Object
| Constructor and Description |
|---|
MutinyHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Executor |
blockingExecutor(io.vertx.core.Vertx vertx)
Create an executor for a
Vertx object, actions can be blocking, they are not executed
on Vert.x event loop. |
static Executor |
blockingExecutor(io.vertx.core.Vertx vertx,
boolean ordered)
Create an executor for a
Vertx object, actions can be blocking, they are not executed
on Ver.tx event loop. |
static Executor |
blockingExecutor(io.vertx.core.WorkerExecutor worker)
Create a scheduler for a
WorkerExecutor object, actions are executed on the threads of this
executor. |
static Executor |
executor(io.vertx.core.Context context)
Create an executor for a
Context, actions are executed on the event loop of this
context. |
static Executor |
executor(io.vertx.core.Vertx vertx)
Create an executor for a
Vertx object, actions are executed on the event loop. |
static <T> WriteStreamSubscriber<T> |
toSubscriber(io.vertx.core.streams.WriteStream<T> stream)
Adapts a Vert.x
WriteStream to a Mutiny Subscriber. |
static <R,T> WriteStreamSubscriber<R> |
toSubscriber(io.vertx.core.streams.WriteStream<T> stream,
Function<R,T> mapping)
Like
toSubscriber(WriteStream), except the provided mapping function is applied to each item. |
static Class |
unwrap(Class<?> type)
Unwrap the type used in Mutiny.
|
public static Executor executor(io.vertx.core.Vertx vertx)
Vertx object, actions are executed on the event loop.vertx - the vert.x objectpublic static Executor executor(io.vertx.core.Context context)
Context, actions are executed on the event loop of this
context.context - the context objectpublic static Executor blockingExecutor(io.vertx.core.Vertx vertx)
Vertx object, actions can be blocking, they are not executed
on Vert.x event loop.vertx - the ver.tx objectpublic static Executor blockingExecutor(io.vertx.core.Vertx vertx, boolean ordered)
Vertx object, actions can be blocking, they are not executed
on Ver.tx event loop.vertx - the vert.x objectordered - if true then if when tasks are scheduled several times on the same context, the executions
for that context will be executed serially, not in parallel. if false then they will be no ordering
guaranteespublic static Executor blockingExecutor(io.vertx.core.WorkerExecutor worker)
WorkerExecutor object, actions are executed on the threads of this
executor.worker - the worker executor objectpublic static Class unwrap(Class<?> type)
type - the type to unwrappublic static <T> WriteStreamSubscriber<T> toSubscriber(io.vertx.core.streams.WriteStream<T> stream)
WriteStream to a Mutiny Subscriber.
After subscription, the original WriteStream handlers should not be used anymore as they will be used by the
adapter.
stream - the stream to adaptSubscriberpublic static <R,T> WriteStreamSubscriber<R> toSubscriber(io.vertx.core.streams.WriteStream<T> stream, Function<R,T> mapping)
toSubscriber(WriteStream), except the provided mapping function is applied to each item.Copyright © 2019–2020 SmallRye. All rights reserved.