Package org.apache.commons.vfs2.cache
Class WeakRefFilesCache
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.cache.AbstractFilesCache
org.apache.commons.vfs2.cache.SoftRefFilesCache
org.apache.commons.vfs2.cache.WeakRefFilesCache
- All Implemented Interfaces:
FilesCache
,VfsComponent
This implementation caches every file as long as it is strongly reachable by the java vm. As soon as the object is no
longer reachable it will be discarded. In contrast to the SoftRefFilesCache this implementation might free resources
faster as it don't wait until a memory limitation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Reference<FileObject>
createReference
(FileObject file, ReferenceQueue<FileObject> refqueue) Methods inherited from class org.apache.commons.vfs2.cache.SoftRefFilesCache
clear, close, getFile, getOrCreateFilesystemCache, putFile, putFileIfAbsent, removeFile
Methods inherited from class org.apache.commons.vfs2.cache.AbstractFilesCache
touchFile
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, init, setContext, setLogger
-
Constructor Details
-
WeakRefFilesCache
public WeakRefFilesCache()
-
-
Method Details
-
createReference
protected Reference<FileObject> createReference(FileObject file, ReferenceQueue<FileObject> refqueue) - Overrides:
createReference
in classSoftRefFilesCache
-