Class DefaultFilesCache

    • Constructor Detail

      • DefaultFilesCache

        public DefaultFilesCache()
    • 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 fileobject 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.
      • getOrCreateFilesystemCache

        protected java.util.concurrent.ConcurrentMap<FileName,​FileObject> getOrCreateFilesystemCache​(FileSystem filesystem)
      • removeFile

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