Class AbstractNioBossPool<E extends Boss>
java.lang.Object
org.jboss.netty.channel.socket.nio.AbstractNioBossPool<E>
- All Implemented Interfaces:
BossPool<E>,NioSelectorPool,ExternalResourceReleasable
- Direct Known Subclasses:
NioClientBossPool,NioServerBossPool
public abstract class AbstractNioBossPool<E extends Boss>
extends Object
implements BossPool<E>, ExternalResourceReleasable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Boss[]private final Executorprivate final AtomicIntegerprivate static final intThe boss pool raises an exception unless all boss threads start and run within this timeout (in seconds.)private final AtomicBooleanprivate static final InternalLogger -
Constructor Summary
ConstructorsConstructorDescriptionAbstractNioBossPool(Executor bossExecutor, int bossCount) Create a new instanceAbstractNioBossPool(Executor bossExecutor, int bossCount, boolean autoInit) -
Method Summary
-
Field Details
-
INITIALIZATION_TIMEOUT
private static final int INITIALIZATION_TIMEOUTThe boss pool raises an exception unless all boss threads start and run within this timeout (in seconds.)- See Also:
-
logger
-
bosses
-
bossIndex
-
bossExecutor
-
initialized
-
-
Constructor Details
-
Method Details
-
init
protected void init() -
waitForBossThreads
private void waitForBossThreads() -
newBoss
-
nextBoss
Description copied from interface:BossPoolReturn the nextBossto use -
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
-
releaseExternalResources
public void releaseExternalResources()Description copied from interface:ExternalResourceReleasableReleases the external resources that this object depends on. You should not call this method if the external resources (e.g. thread pool) are in use by other objects.- Specified by:
releaseExternalResourcesin interfaceExternalResourceReleasable
-
shutdown
public void shutdown()Description copied from interface:NioSelectorPoolShutdown theNioSelectorPooland all internal created resources- Specified by:
shutdownin interfaceNioSelectorPool
-