protected abstract class TDisruptorServer.AbstractSelectorThread extends Thread implements Closeable
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected Selector |
selector |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TDisruptorServer.AbstractSelectorThread(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupSelectionKey(SelectionKey key) |
void |
close() |
boolean |
isStopped() |
protected abstract void |
processKey(SelectionKey key)
Process each individual key that reported ready state
|
void |
run() |
protected abstract void |
selectorIterationComplete()
Called after each selector event loop completion, useful for booking (e.g.
|
void |
wakeupSelector() |
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, yieldprotected final Selector selector
public TDisruptorServer.AbstractSelectorThread(String name) throws IOException
IOExceptionpublic boolean isStopped()
protected abstract void processKey(SelectionKey key) throws IOException
key - The key to processIOException - any I/O related errorprotected abstract void selectorIterationComplete()
throws IOException
IOException - any I/O related errorprotected void cleanupSelectionKey(SelectionKey key)
public void wakeupSelector()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2013-2014. All Rights Reserved.