public class JavaThreadPool extends Object implements IThreadPool
UnoRuntime,
NativeThreadPool,
IThreadPool,
Job,
JobQueue| Modifier and Type | Method and Description |
|---|---|
void |
attach()
Attaches this thread to the thread pool.
|
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(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(Throwable throwable)
Disposes this thread pool, thus releasing all threads by throwing a
DisposedException with the given Throwable cause. |
Object |
enter()
Lets this thread enter the thread pool.
|
Object |
enter(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 Object attach(ThreadId threadId)
IThreadPoolThe function exists for performance.
attach in interface IThreadPoolIThreadPool.attach()public void attach()
IThreadPoolattach in interface IThreadPoolIThreadPool.enter()public void detach(Object handle, ThreadId id)
IThreadPoolThe function exists for performance.
detach in interface IThreadPoolIThreadPool.attach(),
IThreadPool.detach()public void detach()
IThreadPooldetach in interface IThreadPoolIThreadPool.enter()public Object enter() throws Throwable
IThreadPoolThis thread then executes all jobs put via putJob until
a reply job arrives.
enter in interface IThreadPoolThrowableIThreadPool.putJob(com.sun.star.lib.uno.environments.remote.Job)public Object enter(Object handle, ThreadId threadId) throws Throwable
IThreadPoolThis thread then executes all jobs put via putJob until
a reply job arrives.
enter in interface IThreadPoolThrowableIThreadPool.putJob(com.sun.star.lib.uno.environments.remote.Job)public void putJob(Job job)
IThreadPoolputJob in interface IThreadPooljob - the jobpublic void dispose(Throwable throwable)
IThreadPoolDisposedException with the given Throwable cause.dispose in interface IThreadPoolthrowable - the causepublic void destroy()
IThreadPooldestroy in interface IThreadPool