Class DirectoryCache


  • public class DirectoryCache
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.file.Path cachePath  
      private int hits  
      private java.util.Set<java.nio.file.Path> keep  
      private static org.apache.logging.log4j.Logger LOGGER  
      private java.util.Map<java.nio.file.Path,​java.lang.String> newCache  
      private java.util.Map<java.nio.file.Path,​java.lang.String> oldCache  
      private java.nio.file.Path path  
    • Constructor Summary

      Constructors 
      Constructor Description
      DirectoryCache​(java.nio.file.Path p_i49352_1_, java.lang.String p_i49352_2_)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getHash​(java.nio.file.Path p_208323_1_)  
      boolean had​(java.nio.file.Path p_208320_1_)  
      void keep​(java.nio.file.Path p_218456_1_)  
      void purgeStaleAndWrite()  
      void putNew​(java.nio.file.Path p_208316_1_, java.lang.String p_208316_2_)  
      private void removeStale()  
      private java.util.stream.Stream<java.nio.file.Path> walkOutputFiles()  
      • Methods inherited from class java.lang.Object

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

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • path

        private final java.nio.file.Path path
      • cachePath

        private final java.nio.file.Path cachePath
      • hits

        private int hits
      • oldCache

        private final java.util.Map<java.nio.file.Path,​java.lang.String> oldCache
      • newCache

        private final java.util.Map<java.nio.file.Path,​java.lang.String> newCache
      • keep

        private final java.util.Set<java.nio.file.Path> keep
    • Constructor Detail

      • DirectoryCache

        public DirectoryCache​(java.nio.file.Path p_i49352_1_,
                              java.lang.String p_i49352_2_)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • purgeStaleAndWrite

        public void purgeStaleAndWrite()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getHash

        @Nullable
        public java.lang.String getHash​(java.nio.file.Path p_208323_1_)
      • putNew

        public void putNew​(java.nio.file.Path p_208316_1_,
                           java.lang.String p_208316_2_)
      • had

        public boolean had​(java.nio.file.Path p_208320_1_)
      • keep

        public void keep​(java.nio.file.Path p_218456_1_)
      • removeStale

        private void removeStale()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • walkOutputFiles

        private java.util.stream.Stream<java.nio.file.Path> walkOutputFiles()
                                                                     throws java.io.IOException
        Throws:
        java.io.IOException