Interface WorkingTreeCache

  • All Implemented Interfaces:

    
    public interface WorkingTreeCache
    
                        

    A cache for VCS WorkingTrees that manages one working tree for each triple of VcsInfo.type, VcsInfo.url, and VcsInfo.path.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract <T extends Any> T use(VcsInfo vcsInfo, Function2<VersionControlSystem, WorkingTree, T> block) Apply the block to the working tree defined by vcsInfo.
      abstract Unit shutdown() Shut down the cache and clear all cached working trees from the file system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.

      • shutdown

         abstract Unit shutdown()

        Shut down the cache and clear all cached working trees from the file system. The function waits for all currently running operations on the working trees to finish before deleting them.