multiverse.server.util
Class SQThreadPool
java.lang.Object
multiverse.server.util.SQThreadPool
- All Implemented Interfaces:
- Runnable
public class SQThreadPool
- extends Object
- implements Runnable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_THREADS
static final int MIN_THREADS
- See Also:
- Constant Field Values
MAX_THREADS
static final int MAX_THREADS
- See Also:
- Constant Field Values
MIN_RUN_TIME
static final int MIN_RUN_TIME
- See Also:
- Constant Field Values
selfPool
protected static ThreadLocal<SQThreadPool> selfPool
threadStatus
protected static ThreadLocal<SQThreadPool.ThreadStatus> threadStatus
STATUS_NORMAL
static final int STATUS_NORMAL
- See Also:
- Constant Field Values
STATUS_BLOCKED
static final int STATUS_BLOCKED
- See Also:
- Constant Field Values
sq
protected SquareQueue sq
callback
protected SQCallback callback
total
protected int total
running
protected int running
blocking
protected int blocking
threadId
protected int threadId
SQThreadPool
public SQThreadPool(SquareQueue sq,
SQCallback callback)
getRunningPool
public static SQThreadPool getRunningPool()
runningThreadWillBlock
public void runningThreadWillBlock()
doneBlocking
public void doneBlocking()
retiring
private boolean retiring()
run
public void run()
- Specified by:
run in interface Runnable
getSquareQueue
public SquareQueue getSquareQueue()
main
public static void main(String[] args)