Class FileCacheNameIndex


  • public class FileCacheNameIndex
    extends java.lang.Object
    A best-effort cache of MD5 values of files, where the file is identified by its parent's MD5 combined with the file's path inside its parent's 'namespace'.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String parentMD5, java.lang.String name, java.lang.String fileMD5)
      Adds a filename mapping to this cache.
      void clear()  
      java.lang.String get​(java.lang.String parentMD5, java.lang.String name)
      Retrieves a filename mapping from this cache.
      • Methods inherited from class java.lang.Object

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

      • FileCacheNameIndex

        public FileCacheNameIndex()
    • Method Detail

      • clear

        public void clear()
      • add

        public void add​(java.lang.String parentMD5,
                        java.lang.String name,
                        java.lang.String fileMD5)
                 throws java.io.IOException
        Adds a filename mapping to this cache.
        Parameters:
        parentMD5 - the md5 string of the parent object
        name - the name of this object
        fileMD5 - the md5 string of this object
        Throws:
        java.io.IOException - if missing or bad md5 values.
      • get

        public java.lang.String get​(java.lang.String parentMD5,
                                    java.lang.String name)
                             throws java.io.IOException
        Retrieves a filename mapping from this cache.
        Parameters:
        parentMD5 - the md5 string of the parent object
        name - the name of the requested object.
        Returns:
        the md5 string of the requested object, or null if not in cache.
        Throws:
        java.io.IOException - if missing or bad parent md5 values.