Class SafeForkJoinWorkerThreadFactory
java.lang.Object
org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory
- All Implemented Interfaces:
ForkJoinPool.ForkJoinWorkerThreadFactory
public class SafeForkJoinWorkerThreadFactory
extends Object
implements ForkJoinPool.ForkJoinWorkerThreadFactory
Provides a
ForkJoinPool.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 bootstrap class path for it to be visible to ForkJoinPool.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewThread(ForkJoinPool pool) Create a newSafeForkJoinWorkerThreadFactory.SafeForkJoinWorkerThreadfor the given pool.
-
Constructor Details
-
SafeForkJoinWorkerThreadFactory
public SafeForkJoinWorkerThreadFactory()Default constructor.
-
-
Method Details
-
newThread
Create a newSafeForkJoinWorkerThreadFactory.SafeForkJoinWorkerThreadfor the given pool.- Specified by:
newThreadin interfaceForkJoinPool.ForkJoinWorkerThreadFactory- Parameters:
pool- the fork-join pool- Returns:
- a new worker thread with a safe context class loader
-