public class LRUFilesCache extends AbstractFilesCache
LRUMap
.Constructor and Description |
---|
LRUFilesCache()
Default constructor.
|
LRUFilesCache(int lruSize)
Set the desired LRU size.
|
Modifier and Type | Method and Description |
---|---|
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 java.util.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) |
getContext, getLogger, init, setContext, setLogger
public LRUFilesCache()
public LRUFilesCache(int lruSize)
lruSize
- the LRU sizepublic void putFile(FileObject file)
FilesCache
file
- the filepublic FileObject getFile(FileSystem filesystem, FileName name)
FilesCache
name
- the namepublic void clear(FileSystem filesystem)
FilesCache
protected java.util.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)