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 E |
createWorker(Executor executor)
Deprecated.
|
protected void |
init() |
protected 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()
@Deprecated protected E createWorker(Executor executor)
newWorker(Executor)
newWorker(Executor)
protected E newWorker(Executor executor)
Worker
which uses the given Executor
to service IO.
This method will be made abstract in further releases (once createWorker(Executor)
was removed).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-2014 The Netty Project. All Rights Reserved.