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 TypeMethodDescriptionvoiddestroy()Destroy theShareableWorkerPooland release all resources.Return the nextWorkerto usevoidvoidshutdown()Shutdown theNioSelectorPooland all internal created resources
-
Field Details
-
wrapped
-
-
Constructor Details
-
ShareableWorkerPool
-
-
Method Details
-
nextWorker
Description copied from interface:WorkerPoolReturn the nextWorkerto use- Specified by:
nextWorkerin interfaceWorkerPool<E extends Worker>- Returns:
- worker
-
rebuildSelectors
public void rebuildSelectors()Description copied from interface:NioSelectorPoolReplaces the currentSelectors of theBosses with newSelectors to work around the infamous epoll 100% CPU bug.- Specified by:
rebuildSelectorsin interfaceNioSelectorPool
-
destroy
public void destroy()Destroy theShareableWorkerPooland release all resources. After this is called its not usable anymore -
shutdown
public void shutdown()Description copied from interface:NioSelectorPoolShutdown theNioSelectorPooland all internal created resources- Specified by:
shutdownin interfaceNioSelectorPool
-