protected class TDisruptorServer.SelectorThread extends TDisruptorServer.AbstractSelectorThread
Thread.State, Thread.UncaughtExceptionHandlerselectorMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TDisruptorServer.SelectorThread(String name,
int ringSize,
int numWorkers)
Set up the thread that will handle the non-blocking reads, and writes.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
dispatchInvoke(Message message) |
int |
getRingBufferSize() |
protected void |
handleRead(Message message) |
protected void |
handleWrite(Message message) |
protected void |
processKey(SelectionKey key)
Process each individual key that reported ready state
|
protected void |
selectorIterationComplete()
Called after each selector event loop completion, useful for booking (e.g.
|
void |
shutdown() |
void |
subscribe(org.apache.thrift.transport.TNonblockingTransport newClient) |
cleanupSelectionKey, isStopped, run, wakeupSelectoractiveCount, 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, yieldpublic TDisruptorServer.SelectorThread(String name, int ringSize, int numWorkers) throws IOException
IOExceptionprotected void processKey(SelectionKey key)
TDisruptorServer.AbstractSelectorThreadprocessKey in class TDisruptorServer.AbstractSelectorThreadkey - The key to processprotected void selectorIterationComplete()
throws IOException
TDisruptorServer.AbstractSelectorThreadselectorIterationComplete in class TDisruptorServer.AbstractSelectorThreadIOException - any I/O related errorprotected void handleRead(Message message)
protected void handleWrite(Message message)
protected void dispatchInvoke(Message message)
public void subscribe(org.apache.thrift.transport.TNonblockingTransport newClient)
public void shutdown()
public int getRingBufferSize()
Copyright © 2013. All Rights Reserved.