Top Description Fields Constructors Methods
org.hsqldb.lib

pack-priv Class HsqlThreadFactory

extends Object
implements ThreadFactory
Class Inheritance
All Implemented Interfaces
org.hsqldb.lib.ThreadFactory

The default HSQLDB thread factory implementation. This factory can be used to wrap other thread factories using the setImpl method, but, by default simply produces new, vanilla thread objects constructed with the supplied runnable object.
Author
Campbell Burnet (campbell-burnet@users dot sourceforge.net)
Since
1.7.2
Version
1.7.2

Field Summary

Modifier and TypeField and Description
protected ThreadFactory
factory

The factory implementation.

Constructor Summary

AccessConstructor and Description
public
HsqlThreadFactory()

Constructs a new HsqlThreadFactory that uses itself as the factory implementation.

public
HsqlThreadFactory(ThreadFactory
the factory implementation this factory uses
f
)

Constructs a new HsqlThreadFactory whose retrieved threads come from the specified ThreadFactory object or from this factory implementation, if the specified implementation is null.

Method Summary

Modifier and TypeMethod and Description
public synchronized ThreadFactory

Returns:

the factory implementation that this factory is using to produce threads.
getImpl
()

Retrieves the factory implementation that this factory is using to produce threads.

public Thread

Returns:

the requested thread instance
newThread
(Runnable
The runnable that the retrieved thread handles
r
)

Implements org.hsqldb.lib.ThreadFactory.newThread.

Retrieves a thread instance for running the specified Runnable

public synchronized ThreadFactory

Returns:

the previously installed factory implementation
setImpl
(ThreadFactory
the factory implementation that this factory will use to produce threads
f
)

Sets the factory implementation that this factory will use to produce threads.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

factoryback to summary
protected ThreadFactory factory

The factory implementation. Typically, this will be the HsqlThreadFactory object itself.

Constructor Detail

HsqlThreadFactoryback to summary
public HsqlThreadFactory()

Constructs a new HsqlThreadFactory that uses itself as the factory implementation.

HsqlThreadFactoryback to summary
public HsqlThreadFactory(ThreadFactory f)

Constructs a new HsqlThreadFactory whose retrieved threads come from the specified ThreadFactory object or from this factory implementation, if the specified implementation is null.

Parameters
f:ThreadFactory

the factory implementation this factory uses

Method Detail

getImplback to summary
public synchronized ThreadFactory getImpl()

Retrieves the factory implementation that this factory is using to produce threads.

Returns:ThreadFactory

the factory implementation that this factory is using to produce threads.

newThreadback to summary
public Thread newThread(Runnable r)

Implements org.hsqldb.lib.ThreadFactory.newThread.

Retrieves a thread instance for running the specified Runnable

Parameters
r:Runnable

The runnable that the retrieved thread handles

Returns:Thread

the requested thread instance

setImplback to summary
public synchronized ThreadFactory setImpl(ThreadFactory f)

Sets the factory implementation that this factory will use to produce threads. If the specified argument, f, is null, then this factory uses itself as the implementation.

Parameters
f:ThreadFactory

the factory implementation that this factory will use to produce threads

Returns:ThreadFactory

the previously installed factory implementation