Class CachingBinaryManager

    • Constructor Detail

      • CachingBinaryManager

        public CachingBinaryManager()
    • Method Detail

      • initializeCache

        protected void initializeCache​(File dir,
                                       long maxSize,
                                       long maxCount,
                                       long minAge,
                                       FileStorage fileStorage)
        Initialize the cache.
        Parameters:
        dir - the directory to use to store cached files
        maxSize - the maximum size of the cache (in bytes)
        maxCount - the maximum number of files in the cache
        minAge - the minimum age of a file in the cache to be eligible for removal (in seconds)
        fileStorage - the file storage mechanism to use to store and fetch files
        Since:
        5.9.2
      • initializeCache

        public void initializeCache​(String maxSizeStr,
                                    String maxCountStr,
                                    String minAgeStr,
                                    FileStorage fileStorage)
                             throws IOException
        Initializes the cache.
        Parameters:
        maxSizeStr - the maximum size of the cache (as a String)
        maxCountStr - the maximum number of files in the cache
        minAgeStr - the minimum age of a file in the cache to be eligible for removal (in seconds)
        fileStorage - the file storage mechanism to use to store and fetch files
        Throws:
        IOException
        Since:
        7.10-HF03, 8.1
        See Also:
        SizeUtils.parseSizeInBytes(String)
      • close

        public void close()
        Description copied from interface: BinaryManager
        Closes the binary manager and releases all resources and temporary objects held by it.