public class OrderedTaskQueue extends Thread
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
long |
getAvQueue()
Getter for average time waiting
|
long |
getAvRun()
Getter for average time running
|
static OrderedTaskQueue |
getCreateQueue(String name)
grab the queue
|
int |
getDone()
number of already completed tasks
|
long |
getSumQueue()
Getter for sumQueue attribute. total time waiting
|
long |
getSumRun()
Getter for sumRun attribute.
|
boolean |
interruptCurrent(int minAge) |
boolean |
queue(Runnable task) |
void |
run() |
void |
shutDown() |
static void |
shutDown(String name)
grab the queue
|
static void |
shutDownAll() |
int |
size()
size of the waiting queue
|
String |
toString() |
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 OrderedTaskQueue getCreateQueue(String name)
name
- - must not be nullpublic static void shutDown(String name)
name
- - must not be nullpublic static void shutDownAll()
public void shutDown()
public boolean interruptCurrent(int minAge)
minAge
- minimum age to interruptpublic int size()
public int getDone()
public boolean queue(Runnable task)
task
- the thing to send offpublic void run()
run
in interface Runnable
run
in class Thread
Thread.run()
public String toString()
toString
in class Thread
Thread.toString()
public long getAvQueue()
public long getSumQueue()
public long getAvRun()
public long getSumRun()
Copyright © 2018. All rights reserved.