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
Selector s of the Boss es with new Selector s 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 useWorker
public E nextWorker()
WorkerPool
Worker
to usenextWorker
在接口中 WorkerPool<E extends org.jboss.netty.channel.socket.nio.AbstractNioWorker>
public void rebuildSelectors()
NioSelectorPool
Selector
s of the Boss
es with new Selector
s to work around the
infamous epoll 100% CPU bug.rebuildSelectors
在接口中 NioSelectorPool
public void releaseExternalResources()
ExternalResourceReleasable
public void shutdown()
NioSelectorPool
NioSelectorPool
and all internal created resourcesshutdown
在接口中 NioSelectorPool