public class MultiTaskQueue extends OrderedTaskQueue
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
static MultiTaskQueue |
getCreateQueue(String name,
int maxParallel)
grab the queue
|
int |
getCurrentRunning()
get the number of currently running tasks
|
int |
getMaxParallel() |
boolean |
interruptCurrent(int minAge) |
boolean |
interruptTask(Runnable theRunner) |
void |
setMaxParallel(int maxParallel) |
String |
toString() |
getAvQueue, getAvRun, getCreateQueue, getDone, getSumQueue, getSumRun, queue, run, shutDown, shutDown, shutDownAll, size
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, yield
public static MultiTaskQueue getCreateQueue(String name, int maxParallel)
name
- - must not be nullmaxParallel
- ignored if <=0public void setMaxParallel(int maxParallel)
maxParallel
- public int getCurrentRunning()
public boolean interruptCurrent(int minAge)
interruptCurrent
in class OrderedTaskQueue
minAge
- minimum age to interruptpublic boolean interruptTask(Runnable theRunner)
theRunner
- runner to zapppublic String toString()
toString
in class OrderedTaskQueue
Thread.toString()
public int getMaxParallel()
Copyright © 2018. All rights reserved.