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 class
NioBlockingSelector.BlockPoller.RunnableCancel
-
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
-
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
-
-
-
-
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:
run
in interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
-
countDown
public void countDown(java.util.concurrent.CountDownLatch latch)
-
-