public class SoftRefFilesCache extends AbstractFilesCache
SoftReference| Constructor and Description |
|---|
SoftRefFilesCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(FileSystem fileSystem)
Purges the entries corresponding to the FileSystem.
|
void |
close()
Closes the provider.
|
protected Reference<FileObject> |
createReference(FileObject file,
ReferenceQueue<FileObject> refqueue) |
FileObject |
getFile(FileSystem fileSystem,
FileName fileName)
Retrieves a FileObject from the cache by name.
|
protected Map<FileName,Reference<FileObject>> |
getOrCreateFilesystemCache(FileSystem fileSystem) |
void |
putFile(FileObject fileObject)
Adds a FileObject to the cache.
|
boolean |
putFileIfAbsent(FileObject fileObject)
Adds a FileObject to the cache if it isn't already present.
|
void |
removeFile(FileSystem fileSystem,
FileName fileName)
Removes a file from cache.
|
touchFilegetContext, getLogger, init, setContext, setLoggerpublic void putFile(FileObject fileObject)
FilesCachefileObject - the filepublic boolean putFileIfAbsent(FileObject fileObject)
FilesCachefileObject - the fileprotected Reference<FileObject> createReference(FileObject file, ReferenceQueue<FileObject> refqueue)
public FileObject getFile(FileSystem fileSystem, FileName fileName)
FilesCachefileSystem - The FileSystem.fileName - the namepublic void clear(FileSystem fileSystem)
FilesCachefileSystem - The FileSystem.public void close()
AbstractVfsComponentclose in interface FilesCacheclose in interface VfsComponentclose in class AbstractVfsComponentpublic void removeFile(FileSystem fileSystem, FileName fileName)
FilesCachefileSystem - filesystemfileName - filenameprotected Map<FileName,Reference<FileObject>> getOrCreateFilesystemCache(FileSystem fileSystem)
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.