Class NioBlockingSelector.BlockPoller

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    NioBlockingSelector

    protected static class NioBlockingSelector.BlockPoller
    extends java.lang.Thread
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NioBlockingSelector.BlockPoller.RunnableCancel  
      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected SynchronizedQueue<java.lang.Runnable> events  
      protected boolean run  
      protected java.nio.channels.Selector selector  
      protected java.util.concurrent.atomic.AtomicInteger wakeupCounter  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BlockPoller()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(NioEndpoint.NioSocketWrapper key, int ops, NioBlockingSelector.KeyReference ref)  
      void cancel​(java.nio.channels.SelectionKey sk, NioEndpoint.NioSocketWrapper key, int ops)  
      void cancelKey​(java.nio.channels.SelectionKey key)  
      void countDown​(java.util.concurrent.CountDownLatch latch)  
      void disable()  
      boolean events()  
      void remove​(NioEndpoint.NioSocketWrapper key, int ops)  
      void run()  
      void wakeup()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • run

        protected volatile boolean run
      • selector

        protected java.nio.channels.Selector selector
      • wakeupCounter

        protected final java.util.concurrent.atomic.AtomicInteger wakeupCounter
    • Constructor Detail

      • BlockPoller

        protected BlockPoller()
    • Method Detail

      • disable

        public void disable()
      • cancelKey

        public void cancelKey​(java.nio.channels.SelectionKey key)
      • wakeup

        public void wakeup()
      • events

        public boolean events()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • countDown

        public void countDown​(java.util.concurrent.CountDownLatch latch)