public class NonBlockingIOThread extends Thread implements OperationHostileThread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
int |
id |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
NonBlockingIOThread(String threadName,
ILogger logger,
IOOutOfMemoryHandler oomeHandler) |
NonBlockingIOThread(String threadName,
ILogger logger,
IOOutOfMemoryHandler oomeHandler,
SelectorMode selectMode) |
NonBlockingIOThread(String threadName,
ILogger logger,
IOOutOfMemoryHandler oomeHandler,
SelectorMode selectMode,
Selector selector) |
Modifier and Type | Method and Description |
---|---|
void |
addTask(Runnable task)
Adds a task to this NonBlockingIOThread without notifying the thread.
|
void |
addTaskAndWakeup(Runnable task)
Adds a task to be executed by the NonBlockingIOThread and wakes up the selector so that it will
eventually pick up the task.
|
long |
getEventCount()
Returns the total number of selection-key events that have been processed by this thread.
|
IOOutOfMemoryHandler |
getOomeHandler() |
Selector |
getSelector()
Gets the Selector
|
void |
run() |
void |
shutdown() |
String |
toString() |
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, yield
public NonBlockingIOThread(String threadName, ILogger logger, IOOutOfMemoryHandler oomeHandler)
public NonBlockingIOThread(String threadName, ILogger logger, IOOutOfMemoryHandler oomeHandler, SelectorMode selectMode)
public NonBlockingIOThread(String threadName, ILogger logger, IOOutOfMemoryHandler oomeHandler, SelectorMode selectMode, Selector selector)
public final Selector getSelector()
public IOOutOfMemoryHandler getOomeHandler()
public long getEventCount()
public final void addTask(Runnable task)
task
- the task to addNullPointerException
- if task is nullpublic void addTaskAndWakeup(Runnable task)
task
- the task to add.NullPointerException
- if task is nullpublic final void shutdown()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.