|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.apache.thrift.server.AbstractNonblockingServer.AbstractSelectThread
protected abstract class AbstractNonblockingServer.AbstractSelectThread
An abstract thread that handles selecting on a set of transports and
FrameBuffers associated with selected keys
corresponding to requests.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected java.util.Set<AbstractNonblockingServer.FrameBuffer> |
selectInterestChanges
|
protected java.nio.channels.Selector |
selector
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
AbstractNonblockingServer.AbstractSelectThread()
|
|
| Method Summary | |
|---|---|
protected void |
cleanupSelectionKey(java.nio.channels.SelectionKey key)
Do connection-close cleanup on a given SelectionKey. |
protected void |
handleRead(java.nio.channels.SelectionKey key)
Do the work required to read from a readable client. |
protected void |
handleWrite(java.nio.channels.SelectionKey key)
Let a writable client get written, if there's data to be written. |
protected void |
processInterestChanges()
Check to see if there are any FrameBuffers that have switched their interest type from read to write or vice versa. |
void |
requestSelectInterestChange(AbstractNonblockingServer.FrameBuffer frameBuffer)
Add FrameBuffer to the list of select interest changes and wake up the selector if it's blocked. |
void |
wakeupSelector()
If the selector is blocked, wake it up. |
| Methods inherited from class java.lang.Thread |
|---|
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.nio.channels.Selector selector
protected final java.util.Set<AbstractNonblockingServer.FrameBuffer> selectInterestChanges
| Constructor Detail |
|---|
public AbstractNonblockingServer.AbstractSelectThread()
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void wakeupSelector()
public void requestSelectInterestChange(AbstractNonblockingServer.FrameBuffer frameBuffer)
protected void processInterestChanges()
protected void handleRead(java.nio.channels.SelectionKey key)
protected void handleWrite(java.nio.channels.SelectionKey key)
protected void cleanupSelectionKey(java.nio.channels.SelectionKey key)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||