public class JobQueue
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JobQueue.Job
A job that may be added to the job queue.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
m_bInterrupted |
private JobQueue.Job |
m_currentJob |
private java.lang.Thread |
m_currentJobThread |
private java.util.Vector |
m_jobs |
private java.util.Vector |
m_jobThreads |
private java.lang.Thread |
m_threadQueue |
Constructor and Description |
---|
JobQueue(java.lang.String a_name)
Creates and starts the job queue.
|
Modifier and Type | Method and Description |
---|---|
void |
addJob(JobQueue.Job a_anonJob)
Adds a new job to the queue that is run as soon as there are no other running threads
left in the queue.
|
void |
removeAllJobs() |
private void |
removeJob(JobQueue.Job a_anonJob,
boolean a_bNotifyQueue)
Must (!!)
|
void |
stop()
Stops the queue once and for all and interrupts all running threads.
|
private java.util.Vector m_jobs
private java.util.Vector m_jobThreads
private java.lang.Thread m_threadQueue
private boolean m_bInterrupted
private JobQueue.Job m_currentJob
private java.lang.Thread m_currentJobThread
public JobQueue(java.lang.String a_name)
a_name
- name of the queuepublic void addJob(JobQueue.Job a_anonJob)
a_anonJob
- a Jobpublic void stop()
public void removeAllJobs()
private void removeJob(JobQueue.Job a_anonJob, boolean a_bNotifyQueue)
a_anonJob
- a Job to be removedCopyright © 2023. All rights reserved.