Package org.ossreviewtoolkit.downloader
Interface WorkingTreeCache
-
- All Implemented Interfaces:
public interface WorkingTreeCacheA cache for VCS WorkingTrees that manages one working tree for each triple of VcsInfo.type, VcsInfo.url, and VcsInfo.path.
-
-
Method Summary
Modifier and Type Method Description abstract <T extends Any> Tuse(VcsInfo vcsInfo, Function2<VersionControlSystem, WorkingTree, T> block)Apply the block to the working tree defined by vcsInfo. abstract Unitshutdown()Shut down the cache and clear all cached working trees from the file system. -
-
Method Detail
-
use
abstract <T extends Any> T use(VcsInfo vcsInfo, Function2<VersionControlSystem, WorkingTree, T> block)
Apply the block to the working tree defined by vcsInfo. The VcsInfo.revision is ignored during initialization of the working tree, it is the caller's responsibility to update the working tree to the correct revision. The VcsInfo.path is also ignored, so the caller needs to verify that the expected path exists. It is ensured that only one block at a time can access a single working tree, separate working trees can be accessed in parallel.
Throws an IllegalStateException if the cache was already shut down.
-
-
-
-