JobQueue implements a queue for jobs.
For every jobs thread id exists a job queue which is registered
at the ThreadPool.
A JobQueue is split into a sync job queue and an async job queue.
The sync job queue is the registered queue, it delegates async jobs
(put by putjob) into the async queue, which is only
known by the sync queue.
com.sun.star.lib.uno.environments.remote.IThreadPool , com.sun.star.lib.uno.environments.remote.Job , com.sun.star.lib.uno.environments.remote.ThreadId
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | JobQueue.
A thread for dispatching jobs. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| pack-priv JobQueue | |
| private boolean | |
| private boolean | |
| private Object | |
| private Object | |
| private JavaThreadPoolFactory | |
| protected int | |
| protected JobQueue | |
| private ThreadId | |
| private Throwable | |
| private Thread | |
| private static final boolean | DEBUG
When set to true, enables various debugging output. |
| pack-priv final ArrayList |
| Access | Constructor and Description |
|---|---|
| pack-priv | JobQueue(JavaThreadPoolFactory javaThreadPoolFactory, ThreadId
the thread id. threadId)Constructs an async job queue with the given thread id which belongs to the given sync job queue. |
| pack-priv | JobQueue(JavaThreadPoolFactory javaThreadPoolFactory, ThreadId
the thread id. threadId, boolean if true, the queue creates a worker thread if needed. createThread)Constructs a sync job queue with the given thread id and the given thread. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| pack-priv Object | |
| pack-priv Object | |
| pack-priv ThreadId | |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| private Job | Returns: a job or null if timed out.the maximum amount of time to wait for a job. waitTime)Removes a job from the queue. |
| _active | back to summary |
|---|---|
| private boolean _active | |
| _async_jobQueue | back to summary |
|---|---|
| pack-priv JobQueue _async_jobQueue | |
| _createThread | back to summary |
|---|---|
| private boolean _createThread | |
| _createThread_now | back to summary |
|---|---|
| private boolean _createThread_now | |
| _disposeId | back to summary |
|---|---|
| private Object _disposeId | |
| _doDispose | back to summary |
|---|---|
| private Object _doDispose | |
| _javaThreadPoolFactory | back to summary |
|---|---|
| private JavaThreadPoolFactory _javaThreadPoolFactory | |
| _ref_count | back to summary |
|---|---|
| protected int _ref_count | |
| _sync_jobQueue | back to summary |
|---|---|
| protected JobQueue _sync_jobQueue | |
| _threadId | back to summary |
|---|---|
| private ThreadId _threadId | |
| _throwable | back to summary |
|---|---|
| private Throwable _throwable | |
| _worker_thread | back to summary |
|---|---|
| private Thread _worker_thread | |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG When set to true, enables various debugging output. | |
| jobList | back to summary |
|---|---|
| pack-priv final ArrayList<Job> jobList | |
| JobQueue | back to summary |
|---|---|
| pack-priv JobQueue(JavaThreadPoolFactory javaThreadPoolFactory, ThreadId threadId) Constructs an async job queue with the given thread id which belongs to the given sync job queue.
| |
| JobQueue | back to summary |
|---|---|
| pack-priv JobQueue(JavaThreadPoolFactory javaThreadPoolFactory, ThreadId threadId, boolean createThread) Constructs a sync job queue with the given thread id and the given thread.
| |
| acquire | back to summary |
|---|---|
| pack-priv synchronized void acquire() | |
| dispose | back to summary |
|---|---|
| pack-priv synchronized void dispose(Object disposeId, Throwable throwable) If the given disposeId is registered, interrupts the worker thread.
| |
| enter | back to summary |
|---|---|
| pack-priv Object enter(Object disposeId) throws Throwable Enters the job queue. | |
| enter | back to summary |
|---|---|
| pack-priv Object enter(int waitTime, Object disposeId) throws Throwable Enters the job queue. | |
| getThreadId | back to summary |
|---|---|
| pack-priv ThreadId getThreadId() Gives the thread id of this queue.
| |
| putJob | back to summary |
|---|---|
| pack-priv synchronized void putJob(Job job, Object disposeId) Puts a job into the queue. | |
| release | back to summary |
|---|---|
| pack-priv synchronized void release() | |
| removeJob | back to summary |
|---|---|
| private Job removeJob(int waitTime) Removes a job from the queue.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv ThreadId | |
| public void | run()
Overrides java. Implements java. This method is run by the thread when it executes. |
| _disposeId | back to summary |
|---|---|
| pack-priv Object _disposeId | |
| JobDispatcher | back to summary |
|---|---|
| pack-priv JobDispatcher(Object disposeId) | |
| getThreadId | back to summary |
|---|---|
| pack-priv ThreadId getThreadId() | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a
| |