Top Description Fields Constructors Methods
com.sun.star.lib.uno.environments.remote

public final Class ThreadPoolManager

extends Object
Class Inheritance

Manages the UNO thread pool factory.

The thread pool factory is a process-wide resource. It is important that all UNO environments within a process share the same thread pool mechanisms: if a synchronous UNO call is bridged out from one local UNO environment over one remote bridge, and recursively calls back into another local UNO environment over another remote bridge, the code in the second environment should be executed in the thread that did the original call from the first environment.

There are both a Java and a native thread pool factory. A pure Java process will always use the Java thread pool factory. A mixed process uses the system property org.openoffice.native (to be set by the native code that starts the JVM) to determine which implementation to use.

Field Summary

Modifier and TypeField and Description
private static JavaThreadPoolFactory
private static boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static synchronized IThreadPool

Returns:

a new thread pool instance; will never be null.
create
()

Creates a thread pool instance.

public static synchronized boolean

Returns:

false if a Java thread pool has already been created.
useNative
()

Leads to using the native thread pool factory, unless a Java thread pool has already been created.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

javaFactoryback to summary
private static JavaThreadPoolFactory javaFactory
useNativeback to summary
private static boolean useNative

Constructor Detail

ThreadPoolManagerback to summary
private ThreadPoolManager()

Method Detail

createback to summary
public static synchronized IThreadPool create()

Creates a thread pool instance.

Returns:IThreadPool

a new thread pool instance; will never be null.

useNativeback to summary
public static synchronized boolean useNative()

Leads to using the native thread pool factory, unless a Java thread pool has already been created.

Returns:boolean

false if a Java thread pool has already been created.