Class DirectoryCacheFiles

  • All Implemented Interfaces:
    CacheFiles

    public class DirectoryCacheFiles
    extends java.lang.Object
    implements CacheFiles
    A CacheFiles implementation that stores all files in a flat directory.
    • Constructor Summary

      Constructors 
      Constructor Description
      DirectoryCacheFiles​(@NotNull java.io.File directory, @Nullable java.lang.String suffix)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.io.File getCacheFile​(@NotNull java.io.File file, @Nullable java.lang.String prefix)
      Returns the File for caching a given file.
      • Methods inherited from class java.lang.Object

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

      • DirectoryCacheFiles

        public DirectoryCacheFiles​(@NotNull
                                   @NotNull java.io.File directory,
                                   @Nullable
                                   @Nullable java.lang.String suffix)
        Creates a new instance.
        Parameters:
        directory - the cache directory
        suffix - an optional suffix string
    • Method Detail

      • getCacheFile

        @NotNull
        public @NotNull java.io.File getCacheFile​(@NotNull
                                                  @NotNull java.io.File file,
                                                  @Nullable
                                                  @Nullable java.lang.String prefix)
        Description copied from interface: CacheFiles
        Returns the File for caching a given file.
        Specified by:
        getCacheFile in interface CacheFiles
        Parameters:
        file - the file to cache
        prefix - an optional prefix string
        Returns:
        the file for caching