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:
- Closeable,- AutoCloseable,- 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 doesn't wait until a memory limitation.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected Reference<FileObject> createReference(FileObject file, ReferenceQueue<FileObject> refqueue) Constructs a new Reference.Methods inherited from class org.apache.commons.vfs2.cache.SoftRefFilesCacheclear, close, getFile, getOrCreateFilesystemCache, putFile, putFileIfAbsent, removeFile, toStringMethods inherited from class org.apache.commons.vfs2.cache.AbstractFilesCachetouchFileMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentgetContext, getLogger, init, setContext, setLogger
- 
Constructor Details- 
WeakRefFilesCachepublic WeakRefFilesCache()Constructs a new instance.
 
- 
- 
Method Details- 
createReferenceprotected Reference<FileObject> createReference(FileObject file, ReferenceQueue<FileObject> refqueue) Description copied from class:SoftRefFilesCacheConstructs a new Reference.- Overrides:
- createReferencein class- SoftRefFilesCache
- Parameters:
- file- a file object.
- refqueue- a ReferenceQueue.
- Returns:
- a new Reference on the given input.
 
 
-