com.hazelcast.nio.tcp
public abstract class AbstractIOSelector extends Thread implements IOSelector
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
AbstractIOSelector(ThreadGroup threadGroup,
String threadName,
ILogger logger,
IOSelectorOutOfMemoryHandler oomeHandler) |
Modifier and Type | Method and Description |
---|---|
void |
addTask(Runnable task) |
void |
addTaskAndWakeup(Runnable task)
Adds a task to be executed by the IOSelector and wakes up the IOSelector so that it will
eventually pick up the task.
|
Selector |
getSelector() |
protected abstract void |
handleSelectionKey(SelectionKey sk) |
void |
handleSelectionKeyFailure(Throwable e) |
void |
run() |
void |
shutdown() |
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, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
start
public AbstractIOSelector(ThreadGroup threadGroup, String threadName, ILogger logger, IOSelectorOutOfMemoryHandler oomeHandler)
public final void shutdown()
shutdown
in interface IOSelector
public final void addTask(Runnable task)
addTask
in interface IOSelector
public final void addTaskAndWakeup(Runnable task)
IOSelector
addTaskAndWakeup
in interface IOSelector
task
- the task to add.protected abstract void handleSelectionKey(SelectionKey sk)
public void handleSelectionKeyFailure(Throwable e)
handleSelectionKeyFailure
in interface IOSelector
public final Selector getSelector()
getSelector
in interface IOSelector
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.