public final class NioServerBoss extends java.lang.Object implements Boss
限定符和类型 | 字段和说明 |
---|---|
protected static InternalLogger |
logger
Internal Netty logger.
|
protected java.nio.channels.Selector |
selector
The NIO
Selector . |
protected java.lang.Thread |
thread
If this worker has been started thread will be a reference to the thread
used when starting. i.e. the current thread when the run method is executed.
|
protected java.util.concurrent.atomic.AtomicBoolean |
wakenUp
Boolean that controls determines if a blocked Selector.select should
break out of its selection process.
|
限定符和类型 | 方法和说明 |
---|---|
protected boolean |
cleanUpCancelledKeys() |
protected void |
close(java.nio.channels.SelectionKey k) |
protected java.lang.Runnable |
createRegisterTask(Channel channel,
ChannelFuture future) |
protected void |
increaseCancelledKeys() |
protected boolean |
isIoThread() |
protected ThreadRenamingRunnable |
newThreadRenamingRunnable(int id,
ThreadNameDeterminer determiner) |
protected void |
process(java.nio.channels.Selector selector) |
void |
rebuildSelector()
Replaces the current
Selector with a new Selector to work around the infamous epoll 100% CPU
bug. |
void |
register(Channel channel,
ChannelFuture future) |
protected void |
registerTask(java.lang.Runnable task) |
void |
run() |
protected int |
select(java.nio.channels.Selector selector) |
void |
shutdown() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
rebuildSelector, register, shutdown
protected static final InternalLogger logger
protected volatile java.lang.Thread thread
protected volatile java.nio.channels.Selector selector
Selector
.protected final java.util.concurrent.atomic.AtomicBoolean wakenUp
protected void close(java.nio.channels.SelectionKey k)
protected void process(java.nio.channels.Selector selector)
protected int select(java.nio.channels.Selector selector) throws java.io.IOException
java.io.IOException
protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner)
protected java.lang.Runnable createRegisterTask(Channel channel, ChannelFuture future)
public void register(Channel channel, ChannelFuture future)
register
在接口中 NioSelector
protected final void registerTask(java.lang.Runnable task)
protected final boolean isIoThread()
public void rebuildSelector()
NioSelector
Selector
with a new Selector
to work around the infamous epoll 100% CPU
bug.rebuildSelector
在接口中 NioSelector
public void run()
run
在接口中 java.lang.Runnable
protected final void increaseCancelledKeys()
protected final boolean cleanUpCancelledKeys() throws java.io.IOException
java.io.IOException
public void shutdown()
shutdown
在接口中 NioSelector