public class NettyEventLoopDispatcher
extends reactor.core.dispatch.MultiThreadDispatcher
Dispatcher that runs tasks on a Netty EventLoop.| Constructor and Description |
|---|
NettyEventLoopDispatcher(io.netty.channel.EventLoop eventLoop,
int backlog)
Creates a new Netty event loop-based dispatcher that will run tasks on the given
eventLoop with the given
backlog size. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitAndShutdown(long timeout,
java.util.concurrent.TimeUnit timeUnit) |
long |
backlogSize() |
protected void |
execute(reactor.core.dispatch.AbstractLifecycleDispatcher.Task task) |
void |
execute(java.lang.Runnable command) |
void |
forceShutdown() |
long |
remainingSlots() |
void |
shutdown() |
boolean |
supportsOrdering() |
allocateRecursiveTask, allocateTask, inContext, poolSize, tryAllocateTaskpublic NettyEventLoopDispatcher(io.netty.channel.EventLoop eventLoop,
int backlog)
eventLoop with the given
backlog size.eventLoop - The event loop to run tasks onbacklog - The size of the backlog of unexecuted taskspublic boolean awaitAndShutdown(long timeout,
java.util.concurrent.TimeUnit timeUnit)
public void shutdown()
shutdown in interface reactor.fn.Resourceshutdown in class reactor.core.dispatch.AbstractLifecycleDispatcherpublic void forceShutdown()
forceShutdown in interface reactor.fn.ResourceforceShutdown in class reactor.core.dispatch.AbstractLifecycleDispatcherprotected void execute(reactor.core.dispatch.AbstractLifecycleDispatcher.Task task)
execute in class reactor.core.dispatch.AbstractLifecycleDispatcherpublic void execute(java.lang.Runnable command)
execute in interface java.util.concurrent.Executorexecute in class reactor.core.dispatch.AbstractLifecycleDispatcherpublic long remainingSlots()
public long backlogSize()
backlogSize in interface reactor.core.DispatcherbacklogSize in class reactor.core.dispatch.MultiThreadDispatcherpublic boolean supportsOrdering()
supportsOrdering in interface reactor.core.DispatchersupportsOrdering in class reactor.core.dispatch.MultiThreadDispatcher