Package org.apache.thrift.server
Class TNonblockingServer.SelectAcceptThread
java.lang.Object
java.lang.Thread
org.apache.thrift.server.AbstractNonblockingServer.AbstractSelectThread
org.apache.thrift.server.TNonblockingServer.SelectAcceptThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
- TNonblockingServer
protected class TNonblockingServer.SelectAcceptThread
extends AbstractNonblockingServer.AbstractSelectThread
The thread that will be doing all the selecting, managing new connections and those that still
need to be read.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class org.apache.thrift.server.AbstractNonblockingServer.AbstractSelectThread
selectInterestChanges, selectorFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionSelectAcceptThread(TNonblockingServerTransport serverTransport) Set up the thread that will handle the non-blocking accepts, reads, and writes. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractNonblockingServer.FrameBuffercreateFrameBuffer(TNonblockingTransport trans, SelectionKey selectionKey, AbstractNonblockingServer.AbstractSelectThread selectThread) booleanvoidrun()The work loop.Methods inherited from class org.apache.thrift.server.AbstractNonblockingServer.AbstractSelectThread
cleanupSelectionKey, handleRead, handleWrite, processInterestChanges, requestSelectInterestChange, wakeupSelectorMethods 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
-
Constructor Details
-
SelectAcceptThread
Set up the thread that will handle the non-blocking accepts, reads, and writes.- Throws:
IOException
-
-
Method Details
-
isStopped
public boolean isStopped() -
run
public void run()The work loop. Handles both selecting (all IO operations) and managing the selection preferences of all existing connections. -
createFrameBuffer
protected AbstractNonblockingServer.FrameBuffer createFrameBuffer(TNonblockingTransport trans, SelectionKey selectionKey, AbstractNonblockingServer.AbstractSelectThread selectThread) throws TTransportException - Throws:
TTransportException
-