Class ShareableWorkerPool<E extends Worker>
java.lang.Object
org.jboss.netty.channel.socket.nio.ShareableWorkerPool<E>
- All Implemented Interfaces:
NioSelectorPool
,WorkerPool<E>
This implementation of a
WorkerPool
should be used if you plan to share a
WorkerPool
between different Factories. You will need to call destroy()
by your
own once you want to release any resources of it.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy theShareableWorkerPool
and release all resources.Return the nextWorker
to usevoid
void
shutdown()
Shutdown theNioSelectorPool
and all internal created resources
-
Field Details
-
wrapped
-
-
Constructor Details
-
ShareableWorkerPool
-
-
Method Details
-
nextWorker
Description copied from interface:WorkerPool
Return the nextWorker
to use- Specified by:
nextWorker
in interfaceWorkerPool<E extends Worker>
- Returns:
- worker
-
rebuildSelectors
public void rebuildSelectors()Description copied from interface:NioSelectorPool
Replaces the currentSelector
s of theBoss
es with newSelector
s to work around the infamous epoll 100% CPU bug.- Specified by:
rebuildSelectors
in interfaceNioSelectorPool
-
destroy
public void destroy()Destroy theShareableWorkerPool
and release all resources. After this is called its not usable anymore -
shutdown
public void shutdown()Description copied from interface:NioSelectorPool
Shutdown theNioSelectorPool
and all internal created resources- Specified by:
shutdown
in interfaceNioSelectorPool
-