public class NullFilesCache extends AbstractFilesCache
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 and Description |
---|
NullFilesCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear(FileSystem filesystem)
Purges the entries corresponding to the FileSystem.
|
FileObject |
getFile(FileSystem filesystem,
FileName name)
Retrieves a FileObject from the cache by name.
|
void |
putFile(FileObject file)
Adds a FileObject to the cache.
|
boolean |
putFileIfAbsent(FileObject file)
Adds a FileObject to the cache if it isn't already present.
|
void |
removeFile(FileSystem filesystem,
FileName name)
Removes a file from cache.
|
touchFile
close, getContext, getLogger, init, setContext, setLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public void putFile(FileObject file)
FilesCache
file
- the filepublic boolean putFileIfAbsent(FileObject file)
FilesCache
file
- the filepublic FileObject getFile(FileSystem filesystem, FileName name)
FilesCache
filesystem
- The FileSystem.name
- the namepublic void clear(FileSystem filesystem)
FilesCache
filesystem
- The FileSystem.public void removeFile(FileSystem filesystem, FileName name)
FilesCache
filesystem
- file systemname
- file nameCopyright © 2002–2020 The Apache Software Foundation. All rights reserved.