Search in sources :

Example 1 with PluginClassLoader

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";
}
Also used : PluginClassLoader(io.trino.server.PluginClassLoader) PluginClassLoader(io.trino.server.PluginClassLoader)

Example 2 with PluginClassLoader

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());
}
Also used : PluginClassLoader(io.trino.server.PluginClassLoader)

Aggregations

PluginClassLoader (io.trino.server.PluginClassLoader)2