Package alluxio.extensions
Interface ExtensionFactory<T,S extends AlluxioConfiguration>
-
- Type Parameters:
T
- The type of instance to be createdS
- the type of configuration to be used when creating the extension
- All Known Subinterfaces:
UnderFileSystemFactory
public interface ExtensionFactory<T,S extends AlluxioConfiguration>
A factory class for creating instance ofExtensionFactory
based on configurationExtensionFactory
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
create(java.lang.String path, S conf)
Creates a new extension for the given path.boolean
supportsPath(java.lang.String path, S conf)
Gets whether this factory supports the given path and thus whether calling the#create(String, S)
can succeed for this path.
-
-
-
Method Detail
-
create
T create(java.lang.String path, S conf)
Creates a new extension for the given path. AnIllegalArgumentException
is thrown if this factory does not support extension for the given path or if the configuration provided is insufficient to create an extension.- Parameters:
path
- file path with scheme for which the extension will be createdconf
- configuration object for the extension- Returns:
- the new extension
-
supportsPath
boolean supportsPath(java.lang.String path, S conf)
Gets whether this factory supports the given path and thus whether calling the#create(String, S)
can succeed for this path.- Parameters:
path
- file path with scheme for which the extension will be createdconf
- configuration object for the extension- Returns:
- true if the path is supported, false otherwise
-
-