public interface ContextInternal extends Context
| Modifier and Type | Method and Description |
|---|---|
ConcurrentMap<Object,Object> |
contextData() |
<T> void |
executeBlocking(Handler<Promise<T>> blockingCodeHandler,
TaskQueue queue,
Handler<AsyncResult<T>> resultHandler)
Like
Context.executeBlocking(Handler, boolean, Handler) but uses the queue to order the tasks instead
of the internal queue of this context. |
<T> void |
executeBlockingInternal(Handler<Promise<T>> action,
Handler<AsyncResult<T>> resultHandler)
Execute an internal task on the internal blocking ordered executor.
|
void |
executeFromIO(Handler<Void> task)
Like
executeFromIO(Object, Handler) but with no argument. |
<T> void |
executeFromIO(T value,
Handler<T> task)
Execute the context task and switch on this context if necessary, this also associates the
current thread with the current context so
Vertx.currentContext() returns this context.
The caller thread should be the the event loop thread of this context.
Any exception thrown from the task will be reported on this context. |
Deployment |
getDeployment() |
static boolean |
isOnEventLoopThread()
Is the current thread an event thread?
|
static boolean |
isOnVertxThread()
Is the current thread a Vert.x thread? That's either a worker thread or an event loop thread
|
static boolean |
isOnWorkerThread()
Is the current thread a worker thread?
|
io.netty.channel.EventLoop |
nettyEventLoop()
Return the Netty EventLoop used by this Context.
|
VertxInternal |
owner() |
void |
reportException(Throwable t)
Report an exception to this context synchronously.
|
addCloseHook, config, deploymentID, exceptionHandler, exceptionHandler, executeBlocking, executeBlocking, get, getInstanceCount, isEventLoopContext, isMultiThreadedWorkerContext, isWorkerContext, processArgs, put, remove, removeCloseHook, runOnContextstatic boolean isOnWorkerThread()
Context
NOTE! This is not always the same as calling Context.isWorkerContext(). If you are running blocking code
from an event loop context, then this will return true but Context.isWorkerContext() will return false.
isOnWorkerThread in interface Contextstatic boolean isOnEventLoopThread()
Context
NOTE! This is not always the same as calling Context.isEventLoopContext(). If you are running blocking code
from an event loop context, then this will return false but Context.isEventLoopContext() will return true.
isOnEventLoopThread in interface Contextstatic boolean isOnVertxThread()
ContextisOnVertxThread in interface Contextio.netty.channel.EventLoop nettyEventLoop()
<T> void executeBlocking(Handler<Promise<T>> blockingCodeHandler, TaskQueue queue, Handler<AsyncResult<T>> resultHandler)
Context.executeBlocking(Handler, boolean, Handler) but uses the queue to order the tasks instead
of the internal queue of this context.<T> void executeBlockingInternal(Handler<Promise<T>> action, Handler<AsyncResult<T>> resultHandler)
Deployment getDeployment()
nullVertxInternal owner()
void executeFromIO(Handler<Void> task)
executeFromIO(Object, Handler) but with no argument.<T> void executeFromIO(T value,
Handler<T> task)
Vertx.currentContext() returns this context.
The caller thread should be the the event loop thread of this context.
Any exception thrown from the task will be reported on this context.value - the argument for the tasktask - the task to execute with the value argumentvoid reportException(Throwable t)
The exception handler will be called when there is one, otherwise the exception will be logged.
t - the exception to reportConcurrentMap<Object,Object> contextData()
ConcurrentMap used to store context dataContext.get(String),
Context.put(String, Object)Copyright © 2020. All rights reserved.