public class NioClientBossPool extends AbstractNioBossPool<NioClientBoss>
NioClientBoss
instances to use构造器和说明 |
---|
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
|
限定符和类型 | 方法和说明 |
---|---|
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, rebuildSelectors
public NioClientBossPool(java.util.concurrent.Executor bossExecutor, int bossCount, Timer timer, ThreadNameDeterminer determiner)
bossExecutor
- the Executor to use for server the NioClientBoss
bossCount
- 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 ThreadNameDeterminer
bossExecutor
- the Executor to use for server the NioClientBoss
bossCount
- the number of NioClientBoss
instances this NioClientBoss
will holdprotected NioClientBoss newBoss(java.util.concurrent.Executor executor)
AbstractNioBossPool
Boss
which uses the given Executor
to service IOnewBoss
在类中 AbstractNioBossPool<NioClientBoss>
executor
- the Executor
to useBoss
public void shutdown()
NioSelectorPool
NioSelectorPool
and all internal created resourcesshutdown
在接口中 NioSelectorPool
shutdown
在类中 AbstractNioBossPool<NioClientBoss>
public void releaseExternalResources()
ExternalResourceReleasable