Package org.apache.commons.vfs.cache
Class WeakRefFilesCache
- java.lang.Object
-
- org.apache.commons.vfs.provider.AbstractVfsComponent
-
- org.apache.commons.vfs.cache.AbstractFilesCache
-
- org.apache.commons.vfs.cache.SoftRefFilesCache
-
- org.apache.commons.vfs.cache.WeakRefFilesCache
-
- All Implemented Interfaces:
FilesCache
,VfsComponent
public class WeakRefFilesCache extends SoftRefFilesCache
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.- Version:
- $Revision: 485638 $ $Date: 2005-09-30 09:02:41 +0200 (Fr, 30 Sep 2005) $
- Author:
- Mario Ivankovits
- See Also:
WeakReference
-
-
Constructor Summary
Constructors Constructor Description WeakRefFilesCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ref.Reference
createReference(FileObject file, java.lang.ref.ReferenceQueue refqueue)
-
Methods inherited from class org.apache.commons.vfs.cache.SoftRefFilesCache
clear, close, getFile, getOrCreateFilesystemCache, putFile, removeFile, touchFile
-
Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsComponent
getContext, getLogger, init, setContext, setLogger
-
-
-
-
Method Detail
-
createReference
protected java.lang.ref.Reference createReference(FileObject file, java.lang.ref.ReferenceQueue refqueue)
- Overrides:
createReference
in classSoftRefFilesCache
-
-