Class DiskLocationCache

    • Constructor Detail

      • DiskLocationCache

        public DiskLocationCache()
    • Method Detail

      • getBaseDirectory

        public File getBaseDirectory()
      • setBaseDirectory

        public void setBaseDirectory​(File baseDir)
      • isFileLocationCachingEnabled

        public boolean isFileLocationCachingEnabled()
      • setFileLocationCachingEnabled

        public void setFileLocationCachingEnabled​(boolean enabled)
      • canCache

        public boolean canCache​(Location source)
        Description copied from interface: LocationCache
        Gets whether the given location can be cached by this cache.
        Specified by:
        canCache in interface LocationCache
      • loadChecksum

        public String loadChecksum​(Location source)
                            throws IOException
        Description copied from interface: LocationCache
        Loads the checksum value which corresponds to the cached location.
        Specified by:
        loadChecksum in interface LocationCache
        Parameters:
        source - The source location for which the cached checksum is desired.
        Returns:
        The loaded checksum, or null if one is not available.
        Throws:
        IOException - If something goes wrong accessing the checksum.
        See Also:
        DataHandle.checksum()
      • saveChecksum

        public void saveChecksum​(Location source,
                                 String checksum)
                          throws IOException
        Description copied from interface: LocationCache
        Associates the given checksum value with the specified source location.
        Specified by:
        saveChecksum in interface LocationCache
        Parameters:
        source - The source location for which the checksum should be cached.
        checksum - The checksum value to cache.
        Throws:
        IOException - If something goes wrong caching the checksum.
        See Also:
        DataHandle.checksum()