Package one.nio.server
Class SelectorThread
- java.lang.Object
-
- java.lang.Thread
-
- one.nio.server.PayloadThread
-
- one.nio.server.SelectorThread
-
- All Implemented Interfaces:
java.lang.Runnable
public final class SelectorThread extends PayloadThread
-
-
Field Summary
Fields Modifier and Type Field Description private static intBUFFER_SIZEintdedicatedCpu(package private) intmaxReady(package private) longoperationsSelectorselector(package private) longsessions-
Fields inherited from class one.nio.server.PayloadThread
payload, schedulingPolicy
-
-
Constructor Summary
Constructors Constructor Description SelectorThread(int num, int dedicatedCpu, SchedulingPolicy schedulingPolicy, java.lang.String name)
-
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
-
BUFFER_SIZE
private static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
selector
public final Selector selector
-
dedicatedCpu
public final int dedicatedCpu
-
operations
long operations
-
sessions
long sessions
-
maxReady
int maxReady
-
-
Constructor Detail
-
SelectorThread
public SelectorThread(int num, int dedicatedCpu, SchedulingPolicy schedulingPolicy, java.lang.String name) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
shutdown
public void shutdown()
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classPayloadThread
-
-