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 ThreadNameDeterminer
private boolean
private final Timer
-
Constructor Summary
ConstructorsConstructorDescriptionNioClientBossPool
(Executor bossExecutor, int bossCount) Create a new instance using a newHashedWheelTimer
and noThreadNameDeterminer
NioClientBossPool
(Executor bossExecutor, int bossCount, Timer timer, ThreadNameDeterminer determiner) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionprotected NioClientBoss
void
Releases the external resources that this object depends on.void
shutdown()
Shutdown theNioSelectorPool
and all internal created resourcesMethods inherited from class org.jboss.netty.channel.socket.nio.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 theNioClientBoss
bossCount
- the number ofNioClientBoss
instances thisNioClientBossPool
will holdtimer
- the Timer to use for handle connect timeoutsdeterminer
- theThreadNameDeterminer
to use for name the threads. Usenull
if you not want to set one explicit.
-
NioClientBossPool
Create a new instance using a newHashedWheelTimer
and noThreadNameDeterminer
- Parameters:
bossExecutor
- the Executor to use for server theNioClientBoss
bossCount
- the number ofNioClientBoss
instances thisNioClientBoss
will hold
-
-
Method Details
-
newBoss
Description copied from class:AbstractNioBossPool
- Specified by:
newBoss
in classAbstractNioBossPool<NioClientBoss>
- Parameters:
executor
- theExecutor
to use- Returns:
- worker the new
Boss
-
shutdown
public void shutdown()Description copied from interface:NioSelectorPool
Shutdown theNioSelectorPool
and all internal created resources- Specified by:
shutdown
in interfaceNioSelectorPool
- Overrides:
shutdown
in classAbstractNioBossPool<NioClientBoss>
-
releaseExternalResources
public void releaseExternalResources()Description copied from interface:ExternalResourceReleasable
Releases 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:
releaseExternalResources
in interfaceExternalResourceReleasable
- Overrides:
releaseExternalResources
in classAbstractNioBossPool<NioClientBoss>
-