Class DefaultWorkingTreeCache

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T extends Any> T use(VcsInfo vcsInfo, Function2<VersionControlSystem, WorkingTree, T> block) Apply the block to the working tree defined by vcsInfo.
      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

      • DefaultWorkingTreeCache

        DefaultWorkingTreeCache()
    • Method Detail

      • use

         <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

         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.