| Constructor and Description |
|---|
WorkerExecutor(WorkerExecutor delegate) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancepublic WorkerExecutor(WorkerExecutor delegate)
public Object getDelegate()
getDelegate in interface Measuredpublic boolean isMetricsEnabled()
isMetricsEnabled in interface Measuredpublic <T> void executeBlocking(Handler<Future<T>> blockingCodeHandler, boolean ordered, Handler<AsyncResult<T>> resultHandler)
Executes the blocking code in the handler blockingCodeHandler using a thread from the worker pool.
When the code is complete the handler resultHandler will be called with the result on the original context
(e.g. on the original event loop of the caller).
A Future instance is passed into blockingCodeHandler. When the blocking code successfully completes,
the handler should call the Future.complete(T) or Future.complete(T) method, or the Future.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 the 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 guaranteesresultHandler - handler that will be called when the blocking code is completepublic <T> Observable<T> executeBlockingObservable(Handler<Future<T>> blockingCodeHandler, boolean ordered)
Executes the blocking code in the handler blockingCodeHandler using a thread from the worker pool.
When the code is complete the handler resultHandler will be called with the result on the original context
(e.g. on the original event loop of the caller).
A Future instance is passed into blockingCodeHandler. When the blocking code successfully completes,
the handler should call the Future.complete(T) or Future.complete(T) method, or the Future.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 the 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 guaranteespublic <T> void executeBlocking(Handler<Future<T>> blockingCodeHandler, Handler<AsyncResult<T>> resultHandler)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava.core.Future<T>>, boolean, io.vertx.core.Handler<io.vertx.core.AsyncResult<T>>) called with ordered = true.blockingCodeHandler - resultHandler - public <T> Observable<T> executeBlockingObservable(Handler<Future<T>> blockingCodeHandler)
executeBlocking(io.vertx.core.Handler<io.vertx.rxjava.core.Future<T>>, boolean, io.vertx.core.Handler<io.vertx.core.AsyncResult<T>>) called with ordered = true.blockingCodeHandler - public void close()
public static WorkerExecutor newInstance(WorkerExecutor arg)
Copyright © 2016. All rights reserved.