Class NullFilesCache

  • All Implemented Interfaces:
    FilesCache, VfsComponent

    public class NullFilesCache
    extends AbstractFilesCache
    A FilesCache implementation.

    This implementation never ever caches a single file.

    Notice: if you use resolveFile(uri) multiple times with the same path, the system will always create a new instance. Changes on one instance of this file are not seen by the others.

    • Method Detail

      • putFile

        public void putFile​(FileObject file)
        Description copied from interface: FilesCache
        Adds a FileObject to the cache.
        Parameters:
        file - the file
      • putFileIfAbsent

        public boolean putFileIfAbsent​(FileObject file)
        Description copied from interface: FilesCache
        Adds a FileObject to the cache if it isn't already present.
        Parameters:
        file - the file
        Returns:
        true if the file was stored, false otherwise.
      • getFile

        public FileObject getFile​(FileSystem filesystem,
                                  FileName name)
        Description copied from interface: FilesCache
        Retrieves a FileObject from the cache by name.
        Parameters:
        filesystem - The FileSystem.
        name - the name
        Returns:
        the file object or null if file is not cached
      • clear

        public void clear​(FileSystem filesystem)
        Description copied from interface: FilesCache
        Purges the entries corresponding to the FileSystem.
        Parameters:
        filesystem - The FileSystem.
      • removeFile

        public void removeFile​(FileSystem filesystem,
                               FileName name)
        Description copied from interface: FilesCache
        Removes a file from cache.
        Parameters:
        filesystem - filesystem
        name - filename