org.cip4.jdflib.util.thread
Class OrderedTaskQueue
java.lang.Object
java.lang.Thread
org.cip4.jdflib.util.thread.OrderedTaskQueue
- All Implemented Interfaces:
- Runnable
public class OrderedTaskQueue
- extends Thread
class to run heavy tasks one at a time
- Author:
- Rainer Prosi, Heidelberger Druckmaschinen *
| Methods inherited from class java.lang.Thread |
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 |
getCreateQueue
public static OrderedTaskQueue getCreateQueue(String name)
- grab the queue
- Parameters:
name - - must not be null
- Returns:
- the queue to fill with tasks
shutDownAll
public static void shutDownAll()
shutDown
public void shutDown()
size
public int size()
- size of the waiting queue
- Returns:
queue
public boolean queue(Runnable task)
- Parameters:
task - the thing to send off
- Returns:
- true if successfully queued
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
- See Also:
Thread.run()
toString
public String toString()
- Overrides:
toString in class Thread
- Returns:
- See Also:
Thread.toString()
Copyright © 2013. All Rights Reserved.