public class JavaThreadPool extends java.lang.Object implements IThreadPool
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 immediately.
|
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()
IThreadPool
getThreadId
in interface IThreadPool
public java.lang.Object attach(ThreadId threadId)
IThreadPool
The function exists for performance optimization reasons.
attach
in interface IThreadPool
IThreadPool.attach()
public void attach()
IThreadPool
attach
in interface IThreadPool
IThreadPool.enter()
public void detach(java.lang.Object handle, ThreadId id)
IThreadPool
detach
in interface IThreadPool
#attach,#detach
public void detach()
IThreadPool
detach
in interface IThreadPool
IThreadPool.enter()
public java.lang.Object enter() throws java.lang.Throwable
IThreadPool
putJob
until a reply job arrives.
enter
in interface IThreadPool
java.lang.Throwable
IThreadPool.putJob(com.sun.star.lib.uno.environments.remote.Job)
public java.lang.Object enter(java.lang.Object handle, ThreadId threadId) throws java.lang.Throwable
IThreadPool
putJob
until a reply job arrives.
enter
in interface IThreadPool
java.lang.Throwable
IThreadPool.putJob(com.sun.star.lib.uno.environments.remote.Job)
public void putJob(Job job)
IThreadPool
putJob
in interface IThreadPool
job
- the jobpublic void dispose(java.lang.Throwable throwable)
IThreadPool
DisposedException
with the given
Throwable
cause.
dispose
in interface IThreadPool
public void destroy()
IThreadPool
destroy
in interface IThreadPool