Package one.nio.server
Class SelectorThread
- java.lang.Object
-
- java.lang.Thread
-
- one.nio.server.PayloadThread
-
- one.nio.server.SelectorThread
-
- All Implemented Interfaces:
Runnable
public final class SelectorThread extends PayloadThread
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description intdedicatedCpuSelectorselector-
Fields inherited from class one.nio.server.PayloadThread
payload, schedulingPolicy
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description SelectorThread(int num, int dedicatedCpu, SchedulingPolicy schedulingPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidshutdown()-
Methods inherited from class one.nio.server.PayloadThread
current, payload, schedulingPolicy, setPayload, setSchedulingPolicy
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
selector
public final Selector selector
-
dedicatedCpu
public final int dedicatedCpu
-
-
Constructor Detail
-
SelectorThread
public SelectorThread(int num, int dedicatedCpu, SchedulingPolicy schedulingPolicy) throws IOException- Throws:
IOException
-
-
Method Detail
-
shutdown
public void shutdown()
-
run
public void run()
- Specified by:
runin interfaceRunnable- Overrides:
runin classPayloadThread
-
-