public final class ShareableWorkerPool<E extends Worker> extends java.lang.Object implements WorkerPool<E>
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.构造器和说明 |
---|
ShareableWorkerPool(WorkerPool<E> wrapped) |
限定符和类型 | 方法和说明 |
---|---|
void |
destroy()
Destroy the
ShareableWorkerPool and release all resources. |
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 |
shutdown()
Shutdown the
NioSelectorPool and all internal created resources |
public ShareableWorkerPool(WorkerPool<E> wrapped)
public E nextWorker()
WorkerPool
Worker
to usenextWorker
在接口中 WorkerPool<E extends Worker>
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 destroy()
ShareableWorkerPool
and release all resources. After this is called its not usable anymorepublic void shutdown()
NioSelectorPool
NioSelectorPool
and all internal created resourcesshutdown
在接口中 NioSelectorPool