class AprSocketContext.AprPoller
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.Long,AprSocket> |
channels |
private long[] |
desc |
private int |
id |
private java.util.concurrent.atomic.AtomicBoolean |
inPoll |
private java.util.concurrent.atomic.AtomicInteger |
keepAliveCount |
private long |
lastPoll |
private long |
lastPollTime |
private java.util.concurrent.atomic.AtomicInteger |
pollCount |
private java.util.concurrent.atomic.AtomicInteger |
polledCount |
private long |
pool |
private long |
serverPollset |
private int |
size |
private java.util.List<AprSocket> |
updates |
| Constructor and Description |
|---|
AprPoller() |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
add(AprSocket ch)
Called from any thread, return true if we could add it
to pending.
|
protected void |
destroyPoller()
Destroy the poller.
|
(package private) void |
interruptPoll() |
boolean |
isPollerThread() |
private void |
pollAdd(AprSocket up,
int req)
Called only from IO thread
|
(package private) int |
remaining() |
private void |
removeSafe(AprSocket up)
Called only from IO thread.
|
protected void |
requestUpdate(AprSocket ch)
May be called outside of IOThread.
|
void |
run() |
private void |
updateIOThread(AprSocket ch) |
protected void |
updates()
Called only in poller thread, only used if not thread safe
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprivate int id
private int size
private long serverPollset
private long pool
private long[] desc
private long lastPoll
private long lastPollTime
private final java.util.concurrent.atomic.AtomicBoolean inPoll
private final java.util.Map<java.lang.Long,AprSocket> channels
private final java.util.concurrent.atomic.AtomicInteger keepAliveCount
private final java.util.concurrent.atomic.AtomicInteger polledCount
private final java.util.concurrent.atomic.AtomicInteger pollCount
private final java.util.List<AprSocket> updates
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadprotected void destroyPoller()
protected void updates()
throws java.io.IOException
java.io.IOExceptionvoid interruptPoll()
int remaining()
boolean add(AprSocket ch) throws java.io.IOException
java.io.IOExceptionprotected void requestUpdate(AprSocket ch) throws java.io.IOException
java.io.IOExceptionprivate void updateIOThread(AprSocket ch) throws java.io.IOException
java.io.IOExceptionprivate void pollAdd(AprSocket up, int req) throws java.io.IOException
java.io.IOExceptionprivate void removeSafe(AprSocket up)
public boolean isPollerThread()