|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.vfs.provider.AbstractVfsComponent
org.apache.commons.vfs.cache.AbstractFilesCache
org.apache.commons.vfs.cache.LRUFilesCache
public class LRUFilesCache
This implementation caches every file using LRUMap
.
The default constructor uses a LRU size of 100 per filesystem.
Constructor Summary | |
---|---|
LRUFilesCache()
Default constructor. |
|
LRUFilesCache(int lruSize)
Set the desired LRU size. |
Method Summary | |
---|---|
void |
clear(FileSystem filesystem)
purge the entries corresponding to the filesystem. |
void |
close()
Closes the provider. |
FileObject |
getFile(FileSystem filesystem,
FileName name)
retrieve a file from the cache by its name. |
protected Map |
getOrCreateFilesystemCache(FileSystem filesystem)
|
void |
putFile(FileObject file)
add a fileobject to the cache. |
void |
removeFile(FileSystem filesystem,
FileName name)
removes a file from cache. |
void |
touchFile(FileObject file)
|
Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsComponent |
---|
getContext, getLogger, init, setContext, setLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LRUFilesCache()
public LRUFilesCache(int lruSize)
lruSize
- the LRU sizeMethod Detail |
---|
public void putFile(FileObject file)
FilesCache
file
- the filepublic FileObject getFile(FileSystem filesystem, FileName name)
FilesCache
filesystem
- The FileSystem.name
- the name
public void clear(FileSystem filesystem)
FilesCache
filesystem
- The FileSystem.protected Map getOrCreateFilesystemCache(FileSystem filesystem)
public void close()
AbstractVfsComponent
close
in interface FilesCache
close
in interface VfsComponent
close
in class AbstractVfsComponent
public void removeFile(FileSystem filesystem, FileName name)
FilesCache
filesystem
- filesystemname
- filenamepublic void touchFile(FileObject file)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |