public abstract class AbstractNioWorkerPool<E extends org.jboss.netty.channel.socket.nio.AbstractNioWorker> extends Object implements WorkerPool<E>, ExternalResourceReleasable
WorkerPool
implementations that create the Worker
's
up-front and return them in a "fair" fashion when calling nextWorker()
Modifier and Type | Method and Description |
---|---|
protected void |
init() |
protected abstract E |
newWorker(Executor executor)
|
E |
nextWorker()
Return the next
Worker to use |
void |
rebuildSelectors()
|
void |
releaseExternalResources()
Releases the external resources that this object depends on.
|
void |
shutdown()
Shutdown the
NioSelectorPool and all internal created resources |
protected void init()
public E nextWorker()
WorkerPool
Worker
to usenextWorker
in interface 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
in interface NioSelectorPool
public void releaseExternalResources()
ExternalResourceReleasable
releaseExternalResources
in interface ExternalResourceReleasable
public void shutdown()
NioSelectorPool
NioSelectorPool
and all internal created resourcesshutdown
in interface NioSelectorPool
Copyright © 2008-2016 The Netty Project. All Rights Reserved.