Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<WorkerExecutor> |
__TYPE_ARG |
Constructor and Description |
---|
WorkerExecutor(Object delegate) |
WorkerExecutor(WorkerExecutor delegate) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
public static final io.vertx.lang.rx.TypeArg<WorkerExecutor> __TYPE_ARG
public WorkerExecutor(WorkerExecutor delegate)
public WorkerExecutor(Object delegate)
public WorkerExecutor getDelegate()
getDelegate
in interface Measured
public boolean isMetricsEnabled()
isMetricsEnabled
in interface Measured
true
if metrics are enabled@Deprecated public <T> Maybe<T> executeBlocking(Handler<Promise<T>> blockingCodeHandler, boolean ordered)
Executes the blocking code in the handler blockingCodeHandler
using a thread from the worker pool.
The returned future will be completed with the result on the original context (i.e. on the original event loop of the caller) or failed when the handler throws an exception.
A Future
instance is passed into blockingCodeHandler
. When the blocking code successfully completes,
the handler should call the Promise.complete(T)
or Promise.complete(T)
method, or the Promise.fail(java.lang.Throwable)
method if it failed.
In the blockingCodeHandler
the current context remains the original context and therefore any task
scheduled in the blockingCodeHandler
will be executed on this context and not on the worker thread.
blockingCodeHandler
- handler representing the blocking code to runordered
- if true then if executeBlocking is called 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 guarantees@Deprecated public <T> Maybe<T> rxExecuteBlocking(Handler<Promise<T>> blockingCodeHandler, boolean ordered)
Executes the blocking code in the handler blockingCodeHandler
using a thread from the worker pool.
The returned future will be completed with the result on the original context (i.e. on the original event loop of the caller) or failed when the handler throws an exception.
A Future
instance is passed into blockingCodeHandler
. When the blocking code successfully completes,
the handler should call the Promise.complete(T)
or Promise.complete(T)
method, or the Promise.fail(java.lang.Throwable)
method if it failed.
In the blockingCodeHandler
the current context remains the original context and therefore any task
scheduled in the blockingCodeHandler
will be executed on this context and not on the worker thread.
blockingCodeHandler
- handler representing the blocking code to runordered
- if true then if executeBlocking is called 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 guarantees@Deprecated public <T> Maybe<T> executeBlocking(Handler<Promise<T>> blockingCodeHandler)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava3.core.Promise<T>>, boolean)
called with ordered = true.blockingCodeHandler
- @Deprecated public <T> Maybe<T> rxExecuteBlocking(Handler<Promise<T>> blockingCodeHandler)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava3.core.Promise<T>>, boolean)
called with ordered = true.blockingCodeHandler
- public Completable close()
public Completable rxClose()
public <T> Maybe<T> executeBlocking(Callable<T> blockingCodeHandler)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava3.core.Promise<T>>, boolean)
but using a callback.blockingCodeHandler
- public <T> Maybe<T> rxExecuteBlocking(Callable<T> blockingCodeHandler)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava3.core.Promise<T>>, boolean)
but using a callback.blockingCodeHandler
- public <T> Maybe<T> executeBlocking(Callable<T> blockingCodeHandler, boolean ordered)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava3.core.Promise<T>>, boolean)
but using a callback.blockingCodeHandler
- ordered
- public <T> Maybe<T> rxExecuteBlocking(Callable<T> blockingCodeHandler, boolean ordered)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava3.core.Promise<T>>, boolean)
but using a callback.blockingCodeHandler
- ordered
- public static WorkerExecutor newInstance(WorkerExecutor arg)
Copyright © 2024 Eclipse. All rights reserved.