Package one.nio.server
Class CleanupThread
- java.lang.Object
-
- java.lang.Thread
-
- one.nio.os.BatchThread
-
- one.nio.server.CleanupThread
-
- All Implemented Interfaces:
java.lang.Runnable
public class CleanupThread extends BatchThread
-
-
Field Summary
Fields Modifier and Type Field Description private longkeepAliveprivate static org.slf4j.Loggerlogprivate SelectorThread[]selectors
-
Constructor Summary
Constructors Constructor Description CleanupThread(SelectorThread[] selectors, long keepAlive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetKeepAlive()voidrun()voidsetKeepAlive(long keepAlive)voidshutdown()voidupdate(SelectorThread[] selectors, long keepAlive)private longwaitKeepAlive()-
Methods inherited from class one.nio.os.BatchThread
adjustPriority
-
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
-
log
private static final org.slf4j.Logger log
-
selectors
private volatile SelectorThread[] selectors
-
keepAlive
private volatile long keepAlive
-
-
Constructor Detail
-
CleanupThread
public CleanupThread(SelectorThread[] selectors, long keepAlive)
-
-
Method Detail
-
shutdown
public void shutdown()
-
getKeepAlive
public long getKeepAlive()
-
setKeepAlive
public void setKeepAlive(long keepAlive)
-
update
public void update(SelectorThread[] selectors, long keepAlive)
-
waitKeepAlive
private long waitKeepAlive() throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classBatchThread
-
-