Class DefaultContextClassLoaderFactory
- java.lang.Object
-
- org.apache.accumulo.core.classloader.DefaultContextClassLoaderFactory
-
- All Implemented Interfaces:
ContextClassLoaderFactory
public class DefaultContextClassLoaderFactory extends Object implements ContextClassLoaderFactory
The default implementation of ContextClassLoaderFactory. This implementation is subject to change over time. It currently implements the legacy context class loading behavior based on Accumulo's custom class loaders and commons-vfs2. In future, it may simply return the system class loader for all requested contexts. This class is used internally to Accumulo only, and should not be used by users in their configuration.
-
-
Constructor Summary
Constructors Constructor Description DefaultContextClassLoaderFactory(AccumuloConfiguration accConf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoader
getClassLoader(String contextName)
Get the class loader for the given contextName.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.accumulo.core.spi.common.ContextClassLoaderFactory
init
-
-
-
-
Constructor Detail
-
DefaultContextClassLoaderFactory
public DefaultContextClassLoaderFactory(AccumuloConfiguration accConf)
-
-
Method Detail
-
getClassLoader
public ClassLoader getClassLoader(String contextName)
Description copied from interface:ContextClassLoaderFactory
Get the class loader for the given contextName. Callers should not cache the ClassLoader result as it may change if/when the ClassLoader reloads. Implementations should throw a RuntimeException of some type (such as IllegalArgumentException) if the provided contextName is not supported or fails to be constructed.- Specified by:
getClassLoader
in interfaceContextClassLoaderFactory
- Parameters:
contextName
- the name of the context that represents a class loader that is managed by this factory (can be null)- Returns:
- the class loader for the given contextName
-
-