public class NioClientBossPool extends AbstractNioBossPool<NioClientBoss>
NioClientBoss instances to use| Modifier and Type | Field and Description |
|---|---|
private ThreadNameDeterminer |
determiner |
private boolean |
stopTimer |
private Timer |
timer |
| Constructor and Description |
|---|
NioClientBossPool(java.util.concurrent.Executor bossExecutor,
int bossCount)
Create a new instance using a new
HashedWheelTimer and no ThreadNameDeterminer |
NioClientBossPool(java.util.concurrent.Executor bossExecutor,
int bossCount,
Timer timer,
ThreadNameDeterminer determiner)
Create a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected NioClientBoss |
newBoss(java.util.concurrent.Executor executor)
Create a new
Boss which uses the given Executor to service IO |
void |
releaseExternalResources()
Releases the external resources that this object depends on.
|
void |
shutdown()
Shutdown the
NioSelectorPool and all internal created resources |
init, nextBoss, rebuildSelectorsprivate final ThreadNameDeterminer determiner
private final Timer timer
private boolean stopTimer
public NioClientBossPool(java.util.concurrent.Executor bossExecutor,
int bossCount,
Timer timer,
ThreadNameDeterminer determiner)
bossExecutor - the Executor to use for server the NioClientBossbossCount - the number of NioClientBoss instances this NioClientBossPool will holdtimer - the Timer to use for handle connect timeoutsdeterminer - the ThreadNameDeterminer to use for name the threads. Use null
if you not want to set one explicit.public NioClientBossPool(java.util.concurrent.Executor bossExecutor,
int bossCount)
HashedWheelTimer and no ThreadNameDeterminerbossExecutor - the Executor to use for server the NioClientBossbossCount - the number of NioClientBoss instances this NioClientBoss will holdprotected NioClientBoss newBoss(java.util.concurrent.Executor executor)
AbstractNioBossPoolBoss which uses the given Executor to service IOnewBoss in class AbstractNioBossPool<NioClientBoss>executor - the Executor to useBosspublic void shutdown()
NioSelectorPoolNioSelectorPool and all internal created resourcesshutdown in interface NioSelectorPoolshutdown in class AbstractNioBossPool<NioClientBoss>public void releaseExternalResources()
ExternalResourceReleasablereleaseExternalResources in interface ExternalResourceReleasablereleaseExternalResources in class AbstractNioBossPool<NioClientBoss>