public class LFUFileCache extends AbstractFileCache
cache, capacity, maxFileSize, timeout, usedSize| Constructor and Description |
|---|
LFUFileCache(int capacity)
构造
最大文件大小为缓存容量的一半 默认无超时 |
LFUFileCache(int capacity,
int maxFileSize)
构造
默认无超时 |
LFUFileCache(int capacity,
int maxFileSize,
long timeout)
构造
|
| Modifier and Type | Method and Description |
|---|---|
protected Cache<File,byte[]> |
initCache()
初始化实现文件缓存的缓存对象
|
capacity, clear, getCachedFilesCount, getFileBytes, getFileBytes, getUsedSize, maxFileSize, timeoutpublic LFUFileCache(int capacity)
capacity - 缓存容量public LFUFileCache(int capacity,
int maxFileSize)
capacity - 缓存容量maxFileSize - 最大文件大小public LFUFileCache(int capacity,
int maxFileSize,
long timeout)
capacity - 缓存容量maxFileSize - 文件最大大小timeout - 默认超时时间,0表示无默认超时protected Cache<File,byte[]> initCache()
AbstractFileCacheinitCache in class AbstractFileCacheCacheCopyright © 2025. All rights reserved.