Class AbstractNioSelector

java.lang.Object
org.jboss.netty.channel.socket.nio.AbstractNioSelector
All Implemented Interfaces:
Runnable, NioSelector
Direct Known Subclasses:
AbstractNioWorker, NioClientBoss, NioServerBoss

abstract class AbstractNioSelector extends Object implements NioSelector
  • Field Details

    • nextId

      private static final AtomicInteger nextId
    • id

      private final int id
    • logger

      protected static final InternalLogger logger
      Internal Netty logger.
    • CLEANUP_INTERVAL

      private static final int CLEANUP_INTERVAL
      See Also:
    • executor

      private final Executor executor
      Executor used to execute Runnables such as channel registration task.
    • thread

      protected volatile 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.
    • startupLatch

      final CountDownLatch startupLatch
      Count down to 0 when the I/O thread starts and thread is set to non-null.
    • selector

      protected volatile Selector selector
      The NIO Selector.
    • wakenUp

      protected final AtomicBoolean wakenUp
      Boolean that controls determines if a blocked Selector.select should break out of its selection process. In our case we use a timeone for the select method and the select method will block for that time unless waken up.
    • taskQueue

      private final Queue<Runnable> taskQueue
    • cancelledKeys

      private volatile int cancelledKeys
    • shutdownLatch

      private final CountDownLatch shutdownLatch
    • shutdown

      private volatile boolean shutdown
  • Constructor Details

  • Method Details