@Internal public class ConnectionLimitingFactory extends Object implements FileSystemFactory
LimitedConnectionsFileSystem
to a file system.Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration config)
Optional method for plugins to pick up settings from the configuration.
|
FileSystem |
create(URI fsUri)
Creates a new file system for the given file system URI.
|
static FileSystemFactory |
decorateIfLimited(FileSystemFactory factory,
String scheme,
Configuration config)
Decorates the given factory for a
ConnectionLimitingFactory , if the given
configuration configured connection limiting for the given file system scheme. |
ClassLoader |
getClassLoader()
Helper method to get the class loader used to load the plugin.
|
String |
getScheme()
Gets the scheme of the file system created by this factory.
|
public ClassLoader getClassLoader()
Plugin
getClassLoader
in interface Plugin
public String getScheme()
FileSystemFactory
getScheme
in interface FileSystemFactory
public void configure(Configuration config)
Plugin
public FileSystem create(URI fsUri) throws IOException
FileSystemFactory
create
in interface FileSystemFactory
fsUri
- The URI that describes the file system.IOException
- Thrown if the file system could not be instantiated.public static FileSystemFactory decorateIfLimited(FileSystemFactory factory, String scheme, Configuration config)
ConnectionLimitingFactory
, if the given
configuration configured connection limiting for the given file system scheme.
Otherwise, it returns the given factory as is.factory
- The factory to potentially decorate.scheme
- The file scheme for which to check the configuration.config
- The configurationCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.