Package org.apache.commons.vfs2
Interface FilesCache
- All Known Implementing Classes:
- AbstractFilesCache,- DefaultFilesCache,- LRUFilesCache,- NullFilesCache,- SoftRefFilesCache,- WeakRefFilesCache
public interface FilesCache
The fileCache interface. Implementations of this interface are expected to be thread safe.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear(FileSystem fileSystem) Purges the entries corresponding to the FileSystem.voidclose()Purges the whole cache.getFile(FileSystem fileSystem, FileName fileName) Retrieves a FileObject from the cache by name.voidputFile(FileObject file) Adds a FileObject to the cache.booleanputFileIfAbsent(FileObject file) Adds a FileObject to the cache if it isn't already present.voidremoveFile(FileSystem fileSystem, FileName name) Removes a file from cache.
- 
Method Details- 
clearPurges the entries corresponding to the FileSystem.- Parameters:
- fileSystem- The FileSystem.
 
- 
closevoid close()Purges the whole cache.
- 
getFileRetrieves a FileObject from the cache by name.- Parameters:
- fileSystem- The FileSystem.
- fileName- the name
- Returns:
- the file object or null if file is not cached
 
- 
putFileAdds a FileObject to the cache.- Parameters:
- file- the file
 
- 
putFileIfAbsentAdds a FileObject to the cache if it isn't already present.- Parameters:
- file- the file
- Returns:
- true if the file was stored, false otherwise.
 
- 
removeFileRemoves a file from cache.- Parameters:
- fileSystem- file system
- name- file name
 
 
-