public class JavaThreadPool extends java.lang.Object implements IThreadPool
com.sun.star.uno.UnoRuntime,
com.sun.star.lib.uno.environments.remote.ThreadPool,
IThreadPool,
Job,
JobQueue| Modifier and Type | Method and Description |
|---|---|
void |
attach()
Attaches this thread to the thread pool.
|
java.lang.Object |
attach(ThreadId threadId)
As above, but hands in an already existing
instance of the threadid of the current thread.
|
void |
destroy()
Destroys the thread pool and tries
to join all created threads immediatly.
|
void |
detach()
Detaches this thread from the thread pool.
|
void |
detach(java.lang.Object handle,
ThreadId id)
As above, but hands in an already existing
instance of the threadid of the current thread
and a handle returned by attach.
|
void |
dispose(java.lang.Throwable throwable)
Disposes this thread pool, thus releasing
all threads by throwing a
DisposedException with the given
Throwable cause. |
java.lang.Object |
enter()
Lets this thread enter the thread pool.
|
java.lang.Object |
enter(java.lang.Object handle,
ThreadId threadId)
as above but hands in an already existing
instance of the threadid of the current thread
and a handle returned by attach.
|
ThreadId |
getThreadId()
Retrieves the global threadId for the current thread.
|
void |
putJob(Job job)
Queues a job into the jobQueue of the thread belonging
to the jobs threadId.
|
public ThreadId getThreadId()
IThreadPoolgetThreadId in interface IThreadPoolpublic java.lang.Object attach(ThreadId threadId)
IThreadPoolThe function exists for performance optimization reasons.
attach in interface IThreadPoolIThreadPool.attach()public void attach()
IThreadPoolattach in interface IThreadPoolIThreadPool.enter()public void detach(java.lang.Object handle,
ThreadId id)
IThreadPooldetach in interface IThreadPool#attach,#detachpublic void detach()
IThreadPooldetach in interface IThreadPoolIThreadPool.enter()public java.lang.Object enter()
throws java.lang.Throwable
IThreadPoolputJob until a reply job arrives.
enter in interface IThreadPooljava.lang.ThrowableIThreadPool.putJob(com.sun.star.lib.uno.environments.remote.Job)public java.lang.Object enter(java.lang.Object handle,
ThreadId threadId)
throws java.lang.Throwable
IThreadPoolputJob until a reply job arrives.
enter in interface IThreadPooljava.lang.ThrowableIThreadPool.putJob(com.sun.star.lib.uno.environments.remote.Job)public void putJob(Job job)
IThreadPoolputJob in interface IThreadPooljob - the jobpublic void dispose(java.lang.Throwable throwable)
IThreadPoolDisposedException with the given
Throwable cause.
dispose in interface IThreadPoolpublic void destroy()
IThreadPooldestroy in interface IThreadPool