Package org.apache.tomcat.util.net
Class NioBlockingSelector.BlockPoller
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.tomcat.util.net.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 classNioBlockingSelector.BlockPoller.RunnableCancel
-
Field Summary
Fields Modifier and Type Field Description protected SynchronizedQueue<java.lang.Runnable>eventsprotected booleanrunprotected java.nio.channels.Selectorselectorprotected java.util.concurrent.atomic.AtomicIntegerwakeupCounter
-
Constructor Summary
Constructors Modifier Constructor Description protectedBlockPoller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(NioEndpoint.NioSocketWrapper key, int ops, NioBlockingSelector.KeyReference ref)voidcancel(java.nio.channels.SelectionKey sk, NioEndpoint.NioSocketWrapper key, int ops)voidcancelKey(java.nio.channels.SelectionKey key)voidcountDown(java.util.concurrent.CountDownLatch latch)voiddisable()booleanevents()voidremove(NioEndpoint.NioSocketWrapper key, int ops)voidrun()voidwakeup()-
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
-
-
-
-
Field Detail
-
run
protected volatile boolean run
-
selector
protected java.nio.channels.Selector selector
-
events
protected final SynchronizedQueue<java.lang.Runnable> events
-
wakeupCounter
protected final java.util.concurrent.atomic.AtomicInteger wakeupCounter
-
-
Method Detail
-
disable
public void disable()
-
cancelKey
public void cancelKey(java.nio.channels.SelectionKey key)
-
wakeup
public void wakeup()
-
cancel
public void cancel(java.nio.channels.SelectionKey sk, NioEndpoint.NioSocketWrapper key, int ops)
-
add
public void add(NioEndpoint.NioSocketWrapper key, int ops, NioBlockingSelector.KeyReference ref)
-
remove
public void remove(NioEndpoint.NioSocketWrapper key, int ops)
-
events
public boolean events()
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
countDown
public void countDown(java.util.concurrent.CountDownLatch latch)
-
-