Class 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 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 interface ContextClassLoaderFactory
        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