use of io.trino.server.PluginClassLoader in project trino by trinodb.
the class HandleResolver method classLoaderId.
@SuppressWarnings("ObjectEquality")
private static String classLoaderId(Class<?> handleClass) {
ClassLoader classLoader = handleClass.getClassLoader();
if (classLoader instanceof PluginClassLoader) {
return ((PluginClassLoader) classLoader).getId();
}
checkArgument(classLoader == HandleResolver.class.getClassLoader(), "Handle [%s] has unknown class loader [%s]", handleClass.getName(), classLoader.getClass().getName());
return "system";
}
use of io.trino.server.PluginClassLoader in project trino by trinodb.
the class HandleResolver method registerClassLoader.
public void registerClassLoader(PluginClassLoader classLoader) {
ClassLoader existingClassLoader = classLoaders.putIfAbsent(classLoader.getId(), classLoader);
checkState(existingClassLoader == null, "Class loader already registered: %s", classLoader.getId());
}
Aggregations