public abstract static class Repository.LocalProvider extends Object
Lookup#executeWithto temporarily modify the default Lookup contents and route Repository requests to a Repository private to some task. The
LocalProvideris responsible for caching and lifecycle of the Repository instance; it can expire the Repository if the Provider's execution context terminates. Implementations must be prepared to handle requests for Repository already shutdown etc.
|Constructor and Description|
|Modifier and Type||Method and Description|
Allows to delay attaching filesystems to the Repository.
Returns the local repository instance.
public abstract Repository getRepository() throws IOException
nullto indicate the main Repository should be used. The method must return the very same instance of Repository for the whole duration of the execution context. It must return the same Repository instance even after the execution context shuts down; the contents of Repository and its FileSystems may be limited in that case. Implementations must be reentrant (a call to
Repository.getLocalRepository()can be made during construction of the Repository instance) and must not recurse infinitely.
protected final Repository delayFilesystemAttach(Callable<Repository> init) throws IOException
Repository.getLocalRepository(). This method wraps the Repository creation so that the default FileSystem is attached after the repository is fully constructed. The `init' callable must create a new Repository instance. This method will then add the default FS for newly created repository instances.
Built on December 12 2019. | Copyright © 2017-2019 Apache Software Foundation. All Rights Reserved.