Top Description Inners Constructors Methods
org.apache.catalina.startup

public Class SafeForkJoinWorkerThreadFactory

extends Object
implements ForkJoinWorkerThreadFactory
Class Inheritance
All Implemented Interfaces
java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory
Imports
java.util.concurrent.ForkJoinPool, .ForkJoinPool.ForkJoinWorkerThreadFactory, .ForkJoinWorkerThread

Provides a ForkJoinWorkerThreadFactory that provides ForkJoinWorkerThreads that won't trigger memory leaks due to retained references to web application class loaders.

Note

This class must be available on the boot strap class path for it to be visible to ForkJoinPool.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ForkJoinWorkerThread
newThread(ForkJoinPool
the pool this thread works in
pool
)

Implements java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory.newThread.

Returns a new worker thread operating in the given pool.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SafeForkJoinWorkerThreadFactoryback to summary
public SafeForkJoinWorkerThreadFactory()

Method Detail

newThreadback to summary
public ForkJoinWorkerThread newThread(ForkJoinPool pool)

Implements java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory.newThread.

Doc from java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory.newThread.

Returns a new worker thread operating in the given pool. Returning null or throwing an exception may result in tasks never being executed. If this method throws an exception, it is relayed to the caller of the method (for example execute) causing attempted thread creation. If this method returns null or throws an exception, it is not retried until the next attempted creation (for example another call to execute).

Parameters
pool:ForkJoinPool

the pool this thread works in

Returns:ForkJoinWorkerThread

the new worker thread, or null if the request to create a thread is rejected

Annotations
@Override
org.apache.catalina.startup back to summary

private Class SafeForkJoinWorkerThreadFactory.SafeForkJoinWorkerThread

extends ForkJoinWorkerThread
Class Inheritance

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Inherited from java.util.concurrent.ForkJoinWorkerThread:
getPoolgetPoolIndexgetQueuedTaskCountonStartonTerminationrun

Constructor Detail

SafeForkJoinWorkerThreadback to summary
protected SafeForkJoinWorkerThread(ForkJoinPool pool)