use of com.hazelcast.internal.usercodedeployment.UserCodeDeploymentClassLoader in project hazelcast by hazelcast.
the class Node method getConfigClassloader.
private ClassLoader getConfigClassloader(Config config) {
UserCodeDeploymentConfig userCodeDeploymentConfig = config.getUserCodeDeploymentConfig();
ClassLoader classLoader;
if (userCodeDeploymentConfig.isEnabled()) {
ClassLoader parent = config.getClassLoader();
final ClassLoader theParent = parent == null ? Node.class.getClassLoader() : parent;
classLoader = doPrivileged(new PrivilegedAction<UserCodeDeploymentClassLoader>() {
@Override
public UserCodeDeploymentClassLoader run() {
return new UserCodeDeploymentClassLoader(theParent);
}
});
} else {
classLoader = config.getClassLoader();
}
return classLoader;
}
Aggregations