Class NioClientBossPool
java.lang.Object
org.jboss.netty.channel.socket.nio.AbstractNioBossPool<NioClientBoss>
org.jboss.netty.channel.socket.nio.NioClientBossPool
- All Implemented Interfaces:
BossPool<NioClientBoss>, NioSelectorPool, ExternalResourceReleasable
Holds
NioClientBoss instances to use-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ThreadNameDeterminerprivate booleanprivate final Timer -
Constructor Summary
ConstructorsConstructorDescriptionNioClientBossPool(Executor bossExecutor, int bossCount) Create a new instance using a newHashedWheelTimerand noThreadNameDeterminerNioClientBossPool(Executor bossExecutor, int bossCount, Timer timer, ThreadNameDeterminer determiner) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionprotected NioClientBossvoidReleases the external resources that this object depends on.voidshutdown()Shutdown theNioSelectorPooland all internal created resourcesMethods inherited from class AbstractNioBossPool
init, nextBoss, rebuildSelectors
-
Field Details
-
determiner
-
timer
-
stopTimer
private boolean stopTimer
-
-
Constructor Details
-
NioClientBossPool
public NioClientBossPool(Executor bossExecutor, int bossCount, Timer timer, ThreadNameDeterminer determiner) Create a new instance- Parameters:
bossExecutor- the Executor to use for server theNioClientBossbossCount- the number ofNioClientBossinstances thisNioClientBossPoolwill holdtimer- the Timer to use for handle connect timeoutsdeterminer- theThreadNameDeterminerto use for name the threads. Usenullif you not want to set one explicit.
-
NioClientBossPool
Create a new instance using a newHashedWheelTimerand noThreadNameDeterminer- Parameters:
bossExecutor- the Executor to use for server theNioClientBossbossCount- the number ofNioClientBossinstances thisNioClientBosswill hold
-
-
Method Details
-
newBoss
Description copied from class:AbstractNioBossPool- Specified by:
newBossin classAbstractNioBossPool<NioClientBoss>- Parameters:
executor- theExecutorto use- Returns:
- worker the new
Boss
-
shutdown
public void shutdown()Description copied from interface:NioSelectorPoolShutdown theNioSelectorPooland all internal created resources- Specified by:
shutdownin interfaceNioSelectorPool- Overrides:
shutdownin classAbstractNioBossPool<NioClientBoss>
-
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- Overrides:
releaseExternalResourcesin classAbstractNioBossPool<NioClientBoss>
-