Class NullFilesCache
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.cache.AbstractFilesCache
org.apache.commons.vfs2.cache.NullFilesCache
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- FilesCache,- VfsComponent
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.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear(FileSystem filesystem) Purges the entries corresponding to the FileSystem.getFile(FileSystem filesystem, FileName name) 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.Methods inherited from class org.apache.commons.vfs2.cache.AbstractFilesCachetouchFileMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentclose, getContext, getLogger, init, setContext, setLoggerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FilesCacheclose
- 
Constructor Details- 
NullFilesCachepublic NullFilesCache()Constructs a new instance.
 
- 
- 
Method Details- 
clearDescription copied from interface:FilesCachePurges the entries corresponding to the FileSystem.- Parameters:
- filesystem- The FileSystem.
 
- 
getFileDescription copied from interface:FilesCacheRetrieves 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
 
- 
putFileDescription copied from interface:FilesCacheAdds a FileObject to the cache.- Parameters:
- file- the file
 
- 
putFileIfAbsentDescription copied from interface:FilesCacheAdds a FileObject to the cache if it isn't already present.- Parameters:
- file- the file
- Returns:
- true if the file was stored, false otherwise.
 
- 
removeFileDescription copied from interface:FilesCacheRemoves a file from cache.- Parameters:
- filesystem- file system
- name- file name
 
 
-