2019-06-25 09:49:52 +02:00
|
|
|
package sonia.scm.lifecycle.classloading;
|
2019-06-19 11:52:20 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This ClassLoader is mainly a wrapper around the web application class loader and its goal is to make it easier to
|
|
|
|
|
* find it in a heap dump.
|
|
|
|
|
*/
|
|
|
|
|
class BootstrapClassLoader extends ClassLoader {
|
2019-11-21 16:16:15 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Marker to find a BootstrapClassLoader, which is already shutdown.
|
|
|
|
|
*/
|
|
|
|
|
private boolean shutdown = false;
|
|
|
|
|
|
2019-06-19 11:52:20 +02:00
|
|
|
BootstrapClassLoader(ClassLoader webappClassLoader) {
|
|
|
|
|
super(webappClassLoader);
|
|
|
|
|
}
|
2019-11-21 16:16:15 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns {@code true} if the classloader was shutdown.
|
|
|
|
|
*
|
|
|
|
|
* @return {@code true} if the classloader was shutdown
|
|
|
|
|
*/
|
|
|
|
|
boolean isShutdown() {
|
|
|
|
|
return shutdown;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Mark the class loader as shutdown.
|
|
|
|
|
*/
|
|
|
|
|
void markAsShutdown() {
|
|
|
|
|
shutdown = true;
|
|
|
|
|
}
|
2019-06-19 11:52:20 +02:00
|
|
|
}
|