com.hazelcast.nio.tcp
Class AbstractIOSelector

java.lang.Object
  extended by java.lang.Thread
      extended by com.hazelcast.nio.tcp.AbstractIOSelector
All Implemented Interfaces:
NIOThread, IOSelector, Runnable
Direct Known Subclasses:
InSelectorImpl, OutSelectorImpl

public abstract class AbstractIOSelector
extends Thread
implements IOSelector


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  boolean live
           
protected  ILogger logger
           
protected  Selector selector
           
protected  Queue<Runnable> selectorQueue
           
protected  int waitTime
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AbstractIOSelector(ThreadGroup threadGroup, String tname, ILogger logger, IOSelectorOutOfMemoryHandler oomeHandler)
           
 
Method Summary
 void addTask(Runnable runnable)
           
 void awaitShutdown()
           
 Selector getSelector()
           
protected abstract  void handleSelectionKey(SelectionKey sk)
           
 void run()
           
 void shutdown()
           
 void wakeup()
           
 
Methods inherited from class java.lang.Thread
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hazelcast.nio.tcp.IOSelector
start
 

Field Detail

logger

protected final ILogger logger

selectorQueue

protected final Queue<Runnable> selectorQueue

waitTime

protected final int waitTime

selector

protected final Selector selector

live

protected boolean live
Constructor Detail

AbstractIOSelector

public AbstractIOSelector(ThreadGroup threadGroup,
                          String tname,
                          ILogger logger,
                          IOSelectorOutOfMemoryHandler oomeHandler)
Method Detail

shutdown

public final void shutdown()
Specified by:
shutdown in interface IOSelector

awaitShutdown

public final void awaitShutdown()
Specified by:
awaitShutdown in interface IOSelector

addTask

public final void addTask(Runnable runnable)
Specified by:
addTask in interface IOSelector

run

public final void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

handleSelectionKey

protected abstract void handleSelectionKey(SelectionKey sk)

getSelector

public final Selector getSelector()
Specified by:
getSelector in interface IOSelector

wakeup

public final void wakeup()
Specified by:
wakeup in interface IOSelector


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.