public abstract class AbstractNioWorkerPool<E extends org.jboss.netty.channel.socket.nio.AbstractNioWorker> extends java.lang.Object implements WorkerPool<E>, ExternalResourceReleasable
WorkerPool implementations that create the Worker's
up-front and return them in a "fair" fashion when calling nextWorker()| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
init() |
protected abstract E |
newWorker(java.util.concurrent.Executor executor)
Create a new
Worker which uses the given Executor to service IO. |
E |
nextWorker()
Return the next
Worker to use |
void |
rebuildSelectors()
Replaces the current
Selectors of the Bosses with new Selectors to work around the
infamous epoll 100% CPU bug. |
void |
releaseExternalResources()
Releases the external resources that this object depends on.
|
void |
shutdown()
Shutdown the
NioSelectorPool and all internal created resources |
protected void init()
protected abstract E newWorker(java.util.concurrent.Executor executor)
Worker which uses the given Executor to service IO.executor - the Executor to useWorkerpublic E nextWorker()
WorkerPoolWorker to usenextWorker 在接口中 WorkerPool<E extends org.jboss.netty.channel.socket.nio.AbstractNioWorker>public void rebuildSelectors()
NioSelectorPoolSelectors of the Bosses with new Selectors to work around the
infamous epoll 100% CPU bug.rebuildSelectors 在接口中 NioSelectorPoolpublic void releaseExternalResources()
ExternalResourceReleasablepublic void shutdown()
NioSelectorPoolNioSelectorPool and all internal created resourcesshutdown 在接口中 NioSelectorPool